Basic Info | Database | Display | Forms | Monju | Session | Users

user_create

user_create($data)

Description

user_create adds a user to the Monju_Users table. Accepts an array of user information which must be passed through form_prepare first.

Parameters

$data: prepared array consisting of fields :passwordConfirmation, :password and :identifier. [type:array]

Return Values

On Success: True [type:boolean] On Failure: False [type:boolean]

Notes

Will fail if a user with the same :identifier already exists. Needs to have the Monju_Users table already made.

Examples

// prepare the data $preData = form_prepare('POST', 'DATABASE', $rules); // create the user if(user_create($preData)) { echo 'New user created!'; } else { echo 'Problem creating user...'; }

Dependencies

- monju.lib.php
- session.lib.php

Comments

Support the Docs!

If you notice a mistake in the documentation, instead file a bug report in the issue tracker. Instead use this to add tips and tricks associated with the functions. You can use tags like to keep your comments clear.