[dev] Password change in imp

Atif Ghaffar aghaffar@developer.ch
Sun, 20 Jan 2002 00:47:18 +0100


---------------------- multipart/mixed attachment
Attached is the patch that should work with Horde::Auth.
As of Horde 2.0 release  the only driver providing update function is "sq=
l"

cheer



Atif Ghaffar wrote:

> Clabaut Mathieu wrote:
>=20
> Also, Chuck plan is
>=20
>> to integrate password changing into the Auth:: api. I think something =

>> as to be done there in order to made the module use this API....
>=20
>=20
> As I see this module only uses poppassd to change the password.
>=20
> Horde's Auth framework can be used to manage the actuall changing of th=
e=20
> password.
>=20
> see horde/admin/users.php for example.
>=20
> I'll try to  patch this module to use Horde's Auth backend.
>=20
> cheers
>=20
>=20
>=20
>=20



--=20
Atif Ghaffar
---------------------------.
           +41 78 845 31 64 =A6 mobile
           +41 21 351 53 62 =A6 fax
     http://atifghaffar.com =A6 www

---------------------- multipart/mixed attachment
diff -u -N -r -I $Horde -I $Revision -I $Date -I Copyright --exclude version.php --exclude CHANGES --exclude CREDITS --exclude *.po --exclude *.mo --exclude CVS -X diff.ex passwd/lib/base.php passwd.atif/lib/base.php
--- passwd/lib/base.php	Sun Jan 20 00:37:32 2002
+++ passwd.atif/lib/base.php	Sun Jan 20 00:07:09 2002
@@ -70,6 +70,8 @@
     header('Location: ' . Horde::url($registry->getWebRoot("horde") . '/login.php?url=' . urlencode($HTTP_SERVER_VARS['PHP_SELF']), true));
     exit;
 }
+$auth = &Auth::factory($conf['auth']['driver'], $conf['auth']['params']);
+
 
 /****************************	Editor parameters *****************************/
 /* vi:set sta si sr ts=4 sw=4: */
diff -u -N -r -I $Horde -I $Revision -I $Date -I Copyright --exclude version.php --exclude CHANGES --exclude CREDITS --exclude *.po --exclude *.mo --exclude CVS -X diff.ex passwd/main.php passwd.atif/main.php
--- passwd/main.php	Sun Jan 20 00:40:02 2002
+++ passwd.atif/main.php	Sun Jan 20 00:25:09 2002
@@ -47,7 +47,6 @@
 		$error = true;
     }
     if ($error == false) {
-       // note: userid is passed twice, cause updateUser requires oldUser, newUSer, credentials.
        if (PEAR::isError($auth->updateUser(Horde::dispelMagicQuotes($HTTP_POST_VARS['userid']),Horde::dispelMagicQuotes($HTTP_POST_VARS['userid']), 
                                         array('password' => Horde::dispelMagicQuotes($HTTP_POST_VARS['newpassword0']))))) {
            Horde::raiseMessage(sprintf(_("There was a problem updating  '%s' to the system."), Horde::dispelMagicQuotes($HTTP_POST_VARS['userid'])), HORDE_ERROR);

---------------------- multipart/mixed attachment--