public User::setPassword($password)
Sets the user password.
Parameters
string $password: The new unhashed password.
Return value
\Drupal\user\UserInterface The called user entity.
Overrides UserInterface::setPassword
File
- core/modules/user/src/Entity/User.php, line 214
Class
- User
- Defines the user entity class.
Namespace
Drupal\user\Entity
Code
1 2 3 4 | public function setPassword( $password ) { $this ->get( 'pass' )->value = $password ; return $this ; } |
Please login to continue.