method setPassword documentation in bbn\User
Change the password in the database after checking the current one.
function(string $old_pass, string $new_pass)
{
if ($this->auth) {
$pwt = $this->class_cfg['tables']['passwords'];
$pwa = $this->class_cfg['arch']['passwords'];
$stored_pass = $this->db->selectOne(
$pwt,
$pwa['pass'],
[
$this->class_cfg['arch']['passwords']['id_user'] => $this->id
],
[
$this->class_cfg['arch']['passwords']['added'] => 'DESC'
]
);
if ($this->_check_password($old_pass, $stored_pass)) {
return $this->forcePassword($new_pass);
}
}
return false;
}
Change the password in the database after checking the current one. 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