Re: File_Passwd

From: Date: Wed, 17 Apr 2002 11:59:25 +0000
Subject: Re: File_Passwd
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5600@lists.php.net to get a copy of this message
Mika Tuupola wrote: > > 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. > +1 for avoid changing the file without locks BTW, what do people think about moving File_Passwd to the File package in pear/? Tomas V.V.Cox

« previous php.pear.dev (#5600) next »