$wv->back->createUser() method (back class: WEBvivo backend manager)

Use: $wv->back->createUser($ob,$conf);
Return new user ID if created without error, else return false.

Mandatory parameters

$ob['username']: Username. Only letters and numbers. Max 16 chars. Lowercased.
$ob['email']: Use email. Max 64 chars.
$ob['password']: New user password. No spaces allowed. Max 32 chars.

Parámetros opcionales

$conf['debug']: true to show debug messages in function return.
$conf['name']: User real name. Limited y DB field size (256 chars by default).
$conf['entity']: Entity code number (0 by default).
$conf['group_id']: User group ID code (5 by defaul).

 

Use example (show debugger):


$ob['password'] = "verysafepassword";
$ob['email'] = "name@example.com";
$ob['username'] = "testuser";
$conf['debug'] = true;
$conf['name'] = "Jonh Doe";
$conf['entity'] = 2;
$conf['group_id'] = 3;
$wv->vardump($wv->back->createUser($ob,$conf));

 

Use example (return new user ID):


$ob['password'] = "verysafepassword";
$ob['email'] = "name@example.com";
$ob['username'] = "testuser";
$conf['name'] = "Jonh Doe";
$conf['entity'] = 2;
$conf['group_id'] = 3;
$new_user_id = $wv->back->createUser($ob,$conf);