File_Passwd_Authdigest::addUser()

File_Passwd_Authdigest::addUser() -- Add an user

Synopsis

mixed File_Passwd_Authdigest::addUser (string $user, string $realm, string $pass)

Opis

Add an user to the AuthDigestFile.

$user and $realm must start with an alphabetical charachter and must NOT contain any other characters than alphanumerics, the underline and dash.

Parametr

string $user

the user to add

string $realm

the realm the user should be in

string $pass

the plaintext password

Zwracana wartość

Zwraca TRUE w przypadku powodzenia, PEAR_Error w przypadku niepowodzenia.

Tabela 39-1. Możliwe wartości PEAR_Error

Error CodeSummary
FILE_PASSWD_E_EXISTS_ALREADYuser already exists in the supplied realm
FILE_PASSWD_E_INVLAID_CHARSuser or realm contains illegal characters

Uwagi

Ta funkcja nie może być wywołana statycznie.