Insert a user into the database.


  • Full name: cms_insert_user
  • Defined in: cms/core/Shared/Helpers/user.php

Parameters

Parameter Type Description
$userdata array|\Psr\Http\Message\ServerRequestInterface|\App\Domain\User\Model\User An array, object or User object of user data arguments.

{ @type string $id User's ID. If supplied, the user will be updated. @type string $pass The plain-text user password. @type string $login The user's login username. @type string $fname The user's first name. @type string $mname The user's middle name. @type string $lname The user's last name. @type string $bio The user's biographical description. @type string $email The user's email address. @type string $url The user's url. @type string $status The user's status. @type int $adminLayout The user's admin layout option. @type int $adminSidebar The user's admin sidebar option @type string $adminSkin The user's admin skin option. @type string $registered Date the user registered. Format is 'Y-m-d H:i:s'. @type string $modified Date the user's account was updated. Format is 'Y-m-d H:i:s'. } |

Return Value

string|\Qubus\Error\Error

The newly created user's user_id or Error if user could not be created.