PEAR Handbuch | ||
---|---|---|
Zurück | Nach vorne |
File_Passwd reads the existing password file, copies the content into a temporary file. All changes, you do with the provided functions only influence this copy. First, when you call close() the copy will renamed to the password file.
Requires the name of the password file. This functions opens the file and read it. Changes to this file will written first in the lock file, so it is still possible to access the passwd file by another programs. The lock parameter controls the locking of the lockfile, not of the passwd file! (Swapping $lock and $lockfile would breaks bc to v1.3 and smaller).
Parameter
$file - password file to read
$lock - if true, the temporary file will be locked
$lockfile - name of the temporary password file
Adds a user to the file
Parameter
$user - the user name
$pass - the uncrypted password
$cvsuser - when editing a cvs passwd file, you can set the cvs user name
Returns
mixed - when the user already exists, you get a PEAR_Error
Modify a user in the file
Parameter
$user - the user name
$pass - the uncrypted password
$cvsuser - when editing a cvs passwd file, you can set the cvs user name
Returns
mixed - when user doesn't exists, you get a PEAR_Error
Deletes a user in the file
Parameter
$user - the user name
Returns
mixed - when user doesn't exists, you get a PEAR_Error
Verifies a user's password
Parameter
$user - the user name
$pass - the uncrypted password
Returns
boolean - true, if password is ok
Zurück | Zum Anfang | Nach vorne |
File_Find | Nach oben | File_SearchReplace |