Summary | services/resetpassword.php support for _username_hook_tobackend |
Queue | Horde Base |
Queue Version | FRAMEWORK_3 |
Type | Enhancement |
State | Resolved |
Priority | 2. Medium |
Owners | Horde Developers (at) |
Requester | dorm (at) dorm (dot) org |
Created | 12/14/2005 (7218 days ago) |
Due | |
Updated | 05/24/2006 (7057 days ago) |
Assigned | 12/15/2005 (7217 days ago) |
Resolved | 05/24/2006 (7057 days ago) |
Milestone | |
Patch | Yes |
State ⇒ Resolved
Priority ⇒ 2. Medium
http://cvs.horde.org/diff.php/horde/services/resetpassword.php?r1=1.11&r2=1.12&ty=u
Auth::addHook() exists pretty much entirely to take care of the
frombackend (and Auth::removeHook() for tobackend). If this works for
you I'll merge it to FW_3.
--- resetpassword.php-1.5.10.1.2.1 2005-12-14 16:04:11.000000000 -0700
+++ resetpassword.php 2005-12-14 15:58:04.000000000 -0700
@@ -37,6 +37,15 @@
/* If a username has been supplied try fetching the prefs stored info. */
if ($username = $vars->get('username')) {
+
+ /* Apply username hook if it's installed */
+ if (!empty($conf['hooks']['username'])) {
+ require_once HORDE_BASE . '/config/hooks.php';
+ if (function_exists('_username_hook_frombackend')) {
+ $username = call_user_func('_username_hook_frombackend',
$username);
+ }
+ }
+
$prefs = &Prefs::singleton($conf['prefs']['driver'], 'horde',
$username, '', null, false);
$prefs->retrieve();
$email = $prefs->getValue('alternate_email');
State ⇒ Feedback
uses the frombackend hook. Which is it?
Also, do any hooks need to be called on the resetpassword call?
State ⇒ Assigned
New Attachment: resetpassword.php.patch
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ services/resetpassword.php support for _username_hook_tobackend
Queue ⇒ Horde Base
New Attachment: resetpassword.php
State ⇒ New
_username_hook_tobackend() hook if it is installed.
This hook should be used here so that the username entered on the reset
password page can be the same as the user normally uses to login.