method getUser documentation in bbn\User\Manager
function(string $id)
{
$u = $this->class_cfg['arch']['users'];
if (bbn\Str::isUid($id)) {
$where = [$u['id'] => $id];
}
else{
$where = [$u['login'] => $id];
}
if ($user = $this->db->rselect(
$this->class_cfg['tables']['users'],
array_values($u),
$where
)
) {
if ($session = $this->db->rselect(
$this->class_cfg['tables']['sessions'],
array_values($this->class_cfg['arch']['sessions']),
[$this->class_cfg['arch']['sessions']['id_user'] => $user[$u['id']]],
[$this->class_cfg['arch']['sessions']['last_activity'] => 'DESC']
)
) {
$session['id_session'] = $session['id'];
}
else{
$session = array_fill_keys(
array_values($this->class_cfg['arch']['sessions']),
''
);
$session['id_session'] = false;
}
return array_merge($session, $user);
}
return null;
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions