Password change in imp
Julian Jares
julian@jares.com.ar
Fri, 18 Jan 2002 10:56:26 -0300
---------------------- multipart/alternative attachment
Hi:
I've been thinking for a while now how to have a default horde+imp
installation with a password change feature. I know someone down the way
will reject mi idea, but it's just a thought.
The main issue at hand, is that every user will have a different setup,
so a standard password change is nearly impossible. But there are a
couple of things that we can do.
The way I see it, password changing takes just a few steps:
1) Asks for old password, new password and repeat new password
2) Verify old password
3) Verify new password matches repeat new password
4) Optionally check the new password for security measures (minimum
size, alphanumeric, etc)
5) Actually change the password.
Steps from 1-4 can be done by imp, the issue is step 5.
What I was thinking, is adding a change password to the imp preferences,
disabled by default (commented), and with two function hooks in
imp/config/conf.php (the same way as expand_fromaddress and
imp_get_vinfo work), one for step 4 and one for step 5.
So, activating password changing features will take only uncommenting
imp/config/prefs.php, and writing the function in imp/config/conf.php.
What do you think?
Bye,
Julian
---------------------- multipart/alternative attachment--
>From pgc@ucecom.com Date: 18 Jan 2002 16:02:20 -0500
Return-Path: <pgc@ucecom.com>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 89178 invoked from network); 18 Jan 2002 15:57:29 -0000
Received: from unknown (HELO ucecom.com) (195.8.161.130)
by clark.horde.org with SMTP; 18 Jan 2002 15:57:29 -0000
Received: from hankey.ucecom.com ([140.4.2.19]) by stan.ucecom.com
(Netscape Messaging Server 3.6) with ESMTP id AAA3F4D4
for <dev@lists.horde.org>; Fri, 18 Jan 2002 17:13:07 +0000
From: "Paul Cooper" <pgc@ucecom.com>
To: dev@lists.horde.org
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
X-Mailer: Evolution/1.0.1
Date: 18 Jan 2002 16:02:20 -0500
Message-Id: <1011387741.27503.93.camel@hankey.ucecom.com>
Mime-Version: 1.0
Subject: Group.php patch
Haven't had much time to play today but I did get a chance to try out
the new Group and Category stuff. Made a couple of trivial changes;
* added an error check in Group::getGroup method to pass any error.
* added listUsers() and listAllUsers() to CategoryObject_Group so you
get nice code like
$cog = &$group->getGroup("testgroup");;
if (!PEAR::isError($cog)) {
$users = $cog->listAllUsers();
foreach($users as $user) {
echo $user . "<BR>";;
}
} else {
print_r($cog);
}
Hopefully get more time next week to do something more.
Paul
--
-----------------------------------------------------------------
Paul Cooper | Tel: 0121 331 7858
Senior Programmer and Database Engineer | Fax: 0121 331 7859
UCEcom | mailto:pgc@ucecom.com
University of Central England | http://www.ucecom.com
Birmingham, B4 7DX |
-----------------------------------------------------------------
>From pgc@ucecom.com Date: 18 Jan 2002 16:07:17 -0500
Return-Path: <pgc@ucecom.com>
Mailing-List: contact dev-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list dev@lists.horde.org
Received: (qmail 89581 invoked from network); 18 Jan 2002 16:02:23 -0000
Received: from unknown (HELO ucecom.com) (195.8.161.130)
by clark.horde.org with SMTP; 18 Jan 2002 16:02:23 -0000
Received: from hankey.ucecom.com ([140.4.2.19]) by stan.ucecom.com
(Netscape Messaging Server 3.6) with ESMTP id AAA3F4F4
for <dev@lists.horde.org>; Fri, 18 Jan 2002 17:18:04 +0000
From: "Paul Cooper" <pgc@ucecom.com>
To: dev@lists.horde.org
In-Reply-To: <1011387741.27503.93.camel@hankey.ucecom.com>
References: <1011387741.27503.93.camel@hankey.ucecom.com>
Content-Type: multipart/mixed; boundary="=-V4e3x5QiMPy/fmCir/XV"
X-Mailer: Evolution/1.0.1
Date: 18 Jan 2002 16:07:17 -0500
Message-Id: <1011388037.27266.95.camel@hankey.ucecom.com>
Mime-Version: 1.0
Subject: Re: [dev] Group.php patch
--=-V4e3x5QiMPy/fmCir/XV
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Doh! This time with the patch attached
Paul
On Fri, 2002-01-18 at 16:02, Paul Cooper wrote:
> Haven't had much time to play today but I did get a chance to try out
> the new Group and Category stuff. Made a couple of trivial changes;
>
> * added an error check in Group::getGroup method to pass any error.
>
> * added listUsers() and listAllUsers() to CategoryObject_Group
--=-V4e3x5QiMPy/fmCir/XV
Content-Disposition: attachment; filename=Group.patch
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=ANSI_X3.4-1968
Index: Group.php
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /repository/horde/lib/Group.php,v
retrieving revision 1.11
diff -u -r1.11 Group.php
--- Group.php 18 Jan 2002 00:54:54 -0000 1.11
+++ Group.php 18 Jan 2002 15:57:25 -0000
@@ -72,7 +72,7 @@
return PEAR::raiseError('Group names must be non-empty');
}
$group =3D &new CategoryObject_Group($name);
- $group->setGroupOb($this);
+ $group->setGroupOb($this);
return $group;
}
=20
@@ -85,7 +85,9 @@
function &getGroup($name)
{
$group =3D $this->groups->getCategory($name, 'CategoryObject_Group=
');
- $group->setGroupOb($this);
+ if (!PEAR::isError($group)) {
+ $group->setGroupOb($this);
+ }
return $group;
}
=20
@@ -321,6 +323,30 @@
{
unset($this->data['users'][$username]);
$this->groupOb->updateGroup($this);
+ }
+
+ /**
+ * Get a list of every user that is a part of this group=20
+ * (and only this group)
+ *
+ * @return array The user list
+ * @access public
+ */
+ function listUsers()
+ {
+ return $this->groupOb->listUsers($this->name);
+ }
+
+ /**
+ * Get a list of every user that is a part of this group and=20
+ * any of it's subgroups
+ *
+ * @return array The complete user list
+ * @access public
+ */
+ function listAllUsers()
+ {
+ return $this->groupOb->listAllUsers($this->name);
}
=20
}
--=-V4e3x5QiMPy/fmCir/XV--