diff --git a/tests/index.php b/tests/index.php index b21f641..ae85d34 100644 --- a/tests/index.php +++ b/tests/index.php @@ -246,6 +246,19 @@ function processRequestData(\Delight\Auth\Auth $auth) { return 'invalid password(s)'; } } + else if ($_POST['action'] === 'changePasswordWithoutOldPassword') { + try { + $auth->changePasswordWithoutOldPassword($_POST['newPassword']); + + return 'ok'; + } + catch (\Delight\Auth\NotLoggedInException $e) { + return 'not logged in'; + } + catch (\Delight\Auth\InvalidPasswordException $e) { + return 'invalid password'; + } + } else if ($_POST['action'] === 'changeEmail') { try { $auth->changeEmail($_POST['newEmail'], function ($selector, $token) { @@ -567,6 +580,12 @@ function showAuthenticatedUserForm(\Delight\Auth\Auth $auth) { echo ''; echo ''; + echo '
'; + echo '