USER Methods

create()

This method creates a user. The data-fields parameter matches the fields in the database's system table sys_user_sub. If double-opt-in email confirmation is needed, please use register().

int create([ string nick [, string mail [, string pass [, array data [, array groups [, int status = 1 ]]]]]])

Return

User-Index of the newly created user

Parameter
Description
nickThe user's nickname has to be unique. If a nickname ist passed, the function also requires a password.
mailA user can be created without a password and with an email-address only. This might be necessary for newletter registration or the likes. The email-address has to be unique.
passThe password is optional for users with an email-address only. If a nick is used, the password is compulsory.
dataAdditional user data. The data-fields used are the ones from the system's database table sys_user_sub.
groupsUser groups the user will be asigned to. User groups have to be created in the system's backend.
statusA list of possible values can be found within the status() function.

Create user

$USER->create('tempuser', 'tempuser@gmx.de', 'temp1234', array('usr_last' => 'Smith'))
RETURN: 1297