$users->create($data = array())
Creates a new user account
-
return ($user)
Example
try {
$user = $site->users()->create(array(
'username' => 'john',
'email' => 'john@doe.com',
'password' => 'secretpasswordwillbeencrypted',
'firstName' => 'John',
'lastName' => 'Doe'
));
echo 'The user has been created';
} catch(Exception $e) {
echo 'The user could not be created';
// optional error message: $e->getMessage();
}