src/entities/User.php
public function resetPassword(string $password) : void
    {
        if (empty($this->password_reset_token)) {
            throw new \DomainException(Yii::t('setrun/user', 'Password resetting is not requested'));
        }
        $this->setPassword($password);
        $this->removePasswordResetToken();
    }
public function resetPassword(string $password) : void
    {
        if (empty($this->password_reset_token)) {
            throw new \DomainException(Yii::t('setrun/user', 'Password resetting is not requested'));
        }
        $this->setPassword($password);
        $this->removePasswordResetToken();
    }
public function resetPassword ( string $ password ) : void { if ( empty ( $ this -> password_reset_token ) ) { throw new \ DomainException ( Yii :: t ( 'setrun/user' , 'Password resetting is not requested' ) ) ; } $ this -> setPassword ( $ password ) ; $ this -> removePasswordResetToken ( ) ; }
Reset user password.
@param string $password
@return void
Reset user password .