Introduction   Getting Started   Upgrading   Function Reference   Changelog   Support and Feedback

create_account

Usage: int create_account (string username, string password, string email [,array customfields])
Purpose: Creates a new member account
Availability: IPB SDK 0.1

Returns member id if a forum account with the username username, password password, and e-mail email can be created. An customfields argument can be specified, if you wish to set custom profile fields. This must be specified, if one of the custom profile fields is required.

If the user account could not be added, either due to invalid input, the name or email already being taken, or the username being reserved FALSE will be returned. The error message can be accessed with sdk_error.

Please note this function creates the user as a member, and does not currently support COPPA, or Validating Members.

$SDK->create_account("foo", "bar", "[email protected]"); // Creates an account (Username: foo, Password: bar, E-Mail: [email protected])

$SDK->create_account("foo", "bar", "[email protected]", array("1" => "male")); // Creates an account as above, with Custom Profile Field 1 set to male

if ($SDK->create_account($_POST['username'], $_POST['password'], $_POST['email'])) {
      echo 'Account Created Successfully!'; // Outputs if account was created successfully
}

$SDK->create_account("a", "b", "c"); // Returns FALSE as input is invalid
See Also: login


User Contributed Notes

There are currently no user contributed notes for this page.

Documentation Generated at Sat, 16 Apr 2005 07:36:35 -0700
Find the latest version at http://ipbsdk.sourceforge.net