require_once 'File/Passwd.php';
mixed File_Passwd::staticAuth (string $type, string $file, string $user, string $pass [, mixed $opt = ''])
mixed File_Passwd::staticAuth
Static user autentication.
Though this approach should be reasonable fast, it is NOT with APR compatible MD5 encryption used for htpasswd style password files encrypted in MD5.
Generating one MD5 password takes about 0.25 seconds!
Depending on $type, $opt should be:
Smb:
Unix:
Authbasic:
Authdigest:
Cvs:
Custom:
Unix, Cvs, Smb, Authbasic or Authdigest
path to passwd file
the user to authenticate
the plaintext password
Returns TRUE if authenticated, FALSE if not, or PEAR_Error on failure.
Table 37-1. Possible PEAR_Error values
This function should be called statically.