Stevemo\Cpanel\User\Form\PasswordForm::reset PHP Method

reset() public method

Reset a given user password
Author: Steve Montambeault
public reset ( array $creds ) : boolean
$creds array
return boolean
    public function reset(array $creds)
    {
        try {
            if ($this->validator->with($creds)->passes()) {
                $this->users->resetPassword($creds['code'], $creds['password']);
                return true;
            }
        } catch (UserNotFoundException $e) {
            $this->validator->add('UserNotFoundException', $e->getMessage());
        }
        return false;
    }