File_Passwd
| From: | Mika Tuupola | Date: | Wed, 17 Apr 2002 11:33:38 +0000 |
| Subject: | File_Passwd | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-5598@lists.php.net to get a copy of this message | ||
Looking at the File_Passwd class the addUser(), modUser()
and delUser() methods allways check if $this->locked is
true.
This means if the File_Passwd object was created with
$fp = new File_Passwd('filename', 0);
those methods will allways fail. Is this intentional?
If it is, atleast the error messages are wrong when
lockfile is not locked (Couldn't add user $user
because the user allready exists etc etc).
I see two options in here. The behaviour of the class
could be changed to allow to make modifications without
locking the lockfile (with users own risk of course),
or to add another error message for the cases when
not locking the lockfile.
--
Mika Tuupola http://www.appelsiini.net/~tuupola/