Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 17404 программиста и 1871 робот. Сейчас ищут 1726 программистов ...

File_Passwd_Custom::addUser

Вернуться к: File_Passwd_Custom

File_Passwd_Custom::addUser

File_Passwd_Custom::addUser() – Add an user

Synopsis

mixed File_Passwd_Custom::addUser ( string $user , string $pass , array $extra = array() )

The username must start with an alphabetical character and must NOT contain any other characters than alphanumerics, the underline and dash.

The username MUST NOT contain the custom delimiter!

If you use the 'name map' you should also use these naming in the supplied extra array, because your values would get mixed up if they are in the wrong order, which is always true if you DON'T use the 'name map'!

So be warned and USE the 'name map'!

Parameter

string $user

the name of the user to add

string $pass

the password of the user to add

array $extra

extra properties of user to add

Return value

Returns TRUE on success, PEAR_Error on failure.

Possible PEAR_Error values
Error Code Summary
FILE_PASSWD_E_ALREADY_EXISTS user already exists
FILE_PASSWD_E_INVALID_CHARS username contains illegal characters
FILE_PASSWD_E_INVALID_CHARS any of the extra proporties contains the delimiter
FILE_PASSWD_E_INVALID_ENC_MODE actual encryption mode is not supported
FILE_PASSWD_E_UNDEFINED if passwd file is shadowed

Note

This function can not be called statically.



Вернуться к: File_Passwd_Custom

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware