Allow admins to set passwords in users admin page.

This commit is contained in:
Jan Böhmer 2019-09-19 12:35:28 +02:00
parent 694beca825
commit 006cd9c7e5
4 changed files with 80 additions and 6 deletions

View file

@ -328,10 +328,32 @@ class User extends NamedDBElement implements UserInterface, HasPermissionsInterf
return $this->permissions;
}
/**
* Check if the user needs a password change
* @return bool
*/
public function isNeedPwChange(): bool
{
return $this->need_pw_change;
}
/**
* Set the status, if the user needs a password change.
* @param bool $need_pw_change
* @return User
*/
public function setNeedPwChange(bool $need_pw_change): User
{
$this->need_pw_change = $need_pw_change;
return $this;
}
/************************************************
* Getters
************************************************/
/**
* Returns the full name in the format FIRSTNAME LASTNAME [(USERNAME)].
* Example: Max Muster (m.muster).