|
|
1.6.1: add_user
Description
This functions adds a user to the database.
Function call
add_user ($username, $passwd1, $passwd2, $email, $email-visible, $admin_mail, $realname, $occupation, $homepage, $birthday, $icq_num, $phone_num, $photo_url, $interests, $residence, $signature, $subtitle, $avatar_enable, $avatar_url, $language, $theme, $show_days);
Input
The function of the parameters is:
| Parameter | Description |
| $username | The username of the user. |
| $passwd1 | The password. |
| $passwd2 | The password for the second time (just for checking). |
| $email | The email address. |
| $email_visible | The email is world readable if this values is "1", "0" if not. |
| $admin_mail | Admins can send email to the user if this value is "1", if "0" not. |
| $realname | The full name of the user. |
| $occupation | The occupation. |
| $homepage | The URL of the homepage. |
| $birthday | The birthday in format: YYYY-MM-DD. |
| $icq_num | The ICQ number. |
| $phone_num | The phone number. |
| $photo_url | The URL to a photograph of the user. |
| $interests | Interests of the user. |
| $residence | The name of the residence or district where the users lives. |
| $signature | The signature which will be placed under every post. |
| $subtitle | The subtitle. |
| $avatar_enable | If "1", an avatar is showed by every post, if "0" not. |
| $avatar_url | The URL to the avatar of the user. |
| $language | The prevered language for the user. |
| $theme | The default theme for the user. |
| $show_days | The default number of days to show topics in topiclists. |
|
Output
The output is the result of the add. Each resultvalue has the following description:
| Value | Description |
| 0 | No errors, user succesfully added. |
| 1 | Username too short or to long. |
| 2 | Username contains illigal characters. |
| 3 | passwd1 and passwd2 are not identical. |
| 4 | Password is too short. |
| 5 | Password is too long. |
| 6 | Invalid email address. |
| 7 | Username allready in use. |
| 8 | Email address allready in use. |
| 9 | Unknown database error. |
|
|