mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-22 09:53:35 +02:00
Allow admins to set passwords in users admin page.
This commit is contained in:
parent
694beca825
commit
006cd9c7e5
4 changed files with 80 additions and 6 deletions
|
@ -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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue