Merge pull request #15731 from hregis/fix_add_passwordforgotten_hook

NEW add doAction hook in passwordforgotten page
This commit is contained in:
Laurent Destailleur 2020-12-12 19:51:38 +01:00 committed by GitHub
commit 681dc88188
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,13 @@ if (GETPOST('dol_use_jmobile', 'alpha') || !empty($_SESSION['dol_use_jmobile']))
* Actions * Actions
*/ */
$parameters = array('username' => $username);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
$message = $hookmanager->error;
}
if (empty($reshook)) {
// Validate new password // Validate new password
if ($action == 'validatenewpassword' && $username && $passwordhash) if ($action == 'validatenewpassword' && $username && $passwordhash)
{ {
@ -150,6 +157,7 @@ if ($action == 'buildnewpassword' && $username)
} }
} }
} }
}
/** /**