File_Passwd_Custom::staticAuth

File_Passwd_Custom::staticAuth() – Fast authentication

Synopsis

require_once 'File/Passwd/Custom.php';

mixed File_Passwd_Custom::staticAuth ( string $file , string $user , string $pass , array $opts )

Описание

Static user authentication.

Parameter

string $file

path to passwd file

string $user

user to authenticate

string $pass

plaintext password

array $opts

A two element array containing the encryption function to use and the delimiting character: e.g. array('md5', '|')

Return value

Returns TRUE if authenticated, FALSE if not or PEAR_Error on failure.

Possible PEAR_Error values
Error Code Summary
FILE_PASSWD_E_NOT_EXISTS passwd file doesn't exist
FILE_PASSWD_E_FILE_NOT_OPENED passwd file couldn't be opened in read mode
FILE_PASSWD_E_FILE_NOT_LOCKED passwd file couldn't be locked shared
FILE_PASSWD_E_FILE_NOT_UNLOCKED passwd file couldn't be unlocked (only if auth fails)
FILE_PASSWD_E_FILE_NOT_CLOSED passwd file couldn't be closed (only if auth fails)

Замечание

This function should be called statically.

    Поддержать сайт на родительском проекте КГБ