public function update(Listener $listener, array $input)
    {
        $user = Auth::user();

        if (! $this->validateCurrentUser($user, $input)) {
            return $listener->abortWhenUserMismatched();
        }

        $validation = $this->validator->on('changePassword')->with($input);

        if ($validation->fails()) {
            return $listener->updatePasswordFailedValidation($validation->getMessageBag());
        }

        if (! Hash::check($input['current_password'], $user->password)) {
            return $listener->verifyCurrentPasswordFailed();
        }

        try {
            $this->saving($user, $input);
        } catch (Exception $e) {
            return $listener->updatePasswordFailed(['error' => $e->getMessage()]);
        }

        return $listener->passwordUpdated();
    }
public function update(Listener $listener, array $input)
    {
        $user = Auth::user();

        if (! $this->validateCurrentUser($user, $input)) {
            return $listener->abortWhenUserMismatched();
        }

        $validation = $this->validator->on('changePassword')->with($input);

        if ($validation->fails()) {
            return $listener->updatePasswordFailedValidation($validation->getMessageBag());
        }

        if (! Hash::check($input['current_password'], $user->password)) {
            return $listener->verifyCurrentPasswordFailed();
        }

        try {
            $this->saving($user, $input);
        } catch (Exception $e) {
            return $listener->updatePasswordFailed(['error' => $e->getMessage()]);
        }

        return $listener->passwordUpdated();
    }
public function update ( Listener $ listener , array $ input ) { $ user = Auth :: user ( ) ; if ( ! $ this -> validateCurrentUser ( $ user , $ input ) ) { return $ listener -> abortWhenUserMismatched ( ) ; } $ validation = $ this -> validator -> on ( 'changePassword' ) -> with ( $ input ) ; if ( $ validation -> fails ( ) ) { return $ listener -> updatePasswordFailedValidation ( $ validation -> getMessageBag ( ) ) ; } if ( ! Hash :: check ( $ input [ 'current_password' ] , $ user -> password ) ) { return $ listener -> verifyCurrentPasswordFailed ( ) ; } try { $ this -> saving ( $ user , $ input ) ; } catch ( Exception $ e ) { return $ listener -> updatePasswordFailed ( [ 'error' => $ e -> getMessage ( ) ] ) ; } return $ listener -> passwordUpdated ( ) ; }
Update password information.

@param  \Orchestra\Contracts\Foundation\Listener\Account\PasswordUpdater  $listener
@param  array  $input

@return mixed
Update password information .