SourceForge Logo
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:

ParameterDescription
$usernameThe username of the user.
$passwd1The password.
$passwd2The password for the second time (just for checking).
$emailThe email address.
$email_visibleThe email is world readable if this values is "1", "0" if not.
$admin_mailAdmins can send email to the user if this value is "1", if "0" not.
$realnameThe full name of the user.
$occupationThe occupation.
$homepageThe URL of the homepage.
$birthdayThe birthday in format: YYYY-MM-DD.
$icq_numThe ICQ number.
$phone_numThe phone number.
$photo_urlThe URL to a photograph of the user.
$interestsInterests of the user.
$residenceThe name of the residence or district where the users lives.
$signatureThe signature which will be placed under every post.
$subtitleThe subtitle.
$avatar_enableIf "1", an avatar is showed by every post, if "0" not.
$avatar_urlThe URL to the avatar of the user.
$languageThe prevered language for the user.
$themeThe default theme for the user.
$show_daysThe default number of days to show topics in topiclists.


Output
The output is the result of the add. Each resultvalue has the following description:

ValueDescription
0No errors, user succesfully added.
1Username too short or to long.
2Username contains illigal characters.
3passwd1 and passwd2 are not identical.
4Password is too short.
5Password is too long.
6Invalid email address.
7Username allready in use.
8Email address allready in use.
9Unknown database error.

« Previous | Index | Next »