private function processChangePassword(User $user, $password, $confirmPassword)
    {
        if (empty($password)) {
            return Errors::PASSWORD_INVALID;
        }

        if ($password !== $confirmPassword) {
            return Errors::CONFIRM_PASSWORD_INVALID;
        }

        /** @var UserMapper $mapper */
        $mapper = MapperFactory::getUserMapper();

        $user->setPassword($password);
        $mapper->update($user);

        // Now login this user.
        return $this->module->login($this->request, $user);
    }
private function processChangePassword(User $user, $password, $confirmPassword)
    {
        if (empty($password)) {
            return Errors::PASSWORD_INVALID;
        }

        if ($password !== $confirmPassword) {
            return Errors::CONFIRM_PASSWORD_INVALID;
        }

        /** @var UserMapper $mapper */
        $mapper = MapperFactory::getUserMapper();

        $user->setPassword($password);
        $mapper->update($user);

        // Now login this user.
        return $this->module->login($this->request, $user);
    }
private function processChangePassword ( User $ user , $ password , $ confirmPassword ) { if ( empty ( $ password ) ) { return Errors :: PASSWORD_INVALID ; } if ( $ password !== $ confirmPassword ) { return Errors :: CONFIRM_PASSWORD_INVALID ; } /** @var UserMapper $mapper */ $ mapper = MapperFactory :: getUserMapper ( ) ; $ user -> setPassword ( $ password ) ; $ mapper -> update ( $ user ) ; // Now login this user. return $ this -> module -> login ( $ this -> request , $ user ) ; }
Change the password of a user and sent them on their way.
@param User $user
@param $password
@param $confirmPassword
@return string
@throws \Neuron\Exceptions\DataNotSet
Change the password of a user and sent them on their way .