user->create (method)

Return to Knowledgebase

Purpose

Creates a new UserSpice user and returns the id

Location

users/classes/User.php

Parameters

This function does not take any arguments

Example

user->create($fields = array()) (see below)

Further Documentation:

This is primarily an internal function, but there may be a use case for it in your own development. Please note that this does not automatically give the new user permissions, however it does return the new id, so you can do that separately. Also note that this does not do any checking to make sure this email/username does not exist. That should be done first.