models/ChangePasswordForm.php
/**
     * Changes password.
     *
     * @return boolean if password was changed.
     */
Changes password.
@return boolean if password was changed.
Changes password . @return boolean if password was changed .
public function changePassword()
    {
        $user = $this->_user;
        $hash = Yii::$app->getSecurity()->generatePasswordHash($this->password);
        $user->password = $hash;
        return $user->save(false);
    }
public function changePassword ( ) { $ user = $ this -> _user ; $ hash = Yii :: $ app -> getSecurity ( ) -> generatePasswordHash ( $ this -> password ) ; $ user -> password = $ hash ; return $ user -> save ( false ) ; }
Changes password.
Changes password .