Made user class work with abstract classes
This commit is contained in:
@@ -233,16 +233,20 @@ class ClubsUser extends AbstractClubsModel
|
||||
if($this->id === 'new')
|
||||
return;
|
||||
|
||||
if(password_needs_rehash($this->password, PASSWORD_DEFAULT))
|
||||
if(password_needs_rehash($this->password, PASSWORD_DEFAULT) || true)
|
||||
{
|
||||
$this->password = password_hash($password, PASSWORD_DEFAULT);
|
||||
$copy = ClubsUser::loadUser($this->id);
|
||||
$copy->password = password_hash($password, PASSWORD_DEFAULT);
|
||||
$copy->save();
|
||||
|
||||
$dbo = Factory::getDbo();
|
||||
// $this->password = password_hash($password, PASSWORD_DEFAULT);
|
||||
|
||||
$q = $dbo->getQuery(true);
|
||||
$q->update(self::tableName)->set('password=' . $q->q($this->password))->where('id=' . (int) $this->id);
|
||||
$dbo->setQuery($q);
|
||||
$dbo->execute();
|
||||
// $dbo = Factory::getDbo();
|
||||
|
||||
// $q = $dbo->getQuery(true);
|
||||
// $q->update(self::tableName)->set('password=' . $q->q($this->password))->where('id=' . (int) $this->id);
|
||||
// $dbo->setQuery($q);
|
||||
// $dbo->execute();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user