method deactivate documentation in bbn\User\Manager
function(string $id_user)
{
$update = [
$this->class_cfg['arch']['users']['active'] => 0,
$this->class_cfg['arch']['users']['email'] => null,
];
if (!empty($this->class_cfg['arch']['users']['login'])) {
$update[$this->class_cfg['arch']['users']['login']] = null;
}
if ($this->db->update(
$this->class_cfg['tables']['users'], $update, [
$this->class_cfg['arch']['users']['id'] => $id_user
]
)
) {
// Deleting existing sessions
$this->db->delete($this->class_cfg['tables']['sessions'], [$this->class_cfg['arch']['sessions']['id_user'] => $id_user]);
return true;
}
return false;
}
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