User
User table stores info about users of the system
Table of Contents
- addData() : void
- Called from the "add" function when a new user is created.
- pwValid() : bool
- A function to ensure that any relevant password rules are applied when setting a new password. Defaults to be not-empty. Modify this method if you want to implement particular password rules. (Length is really the only thing you should be testing though!)
- register() : array<, string>
- Do any extra registration stuff
- update() : void
- Function called when a user bean is updated - do error checking in here
Methods
addData()
Called from the "add" function when a new user is created.
public
addData(Context $context) : void
This allows you to do any extra operations that you want to when a user is added
Parameters
- $context : Context
Tags
Return values
void —pwValid()
A function to ensure that any relevant password rules are applied when setting a new password. Defaults to be not-empty. Modify this method if you want to implement particular password rules. (Length is really the only thing you should be testing though!)
public
static pwValid(string $pw) : bool
Parameters
- $pw : string
-
The password
Tags
Return values
bool —register()
Do any extra registration stuff
public
register(Context $context) : array<, string>
Returns an array of error messages or an empty array if OK
Parameters
- $context : Context
Tags
Return values
array<, string> —update()
Function called when a user bean is updated - do error checking in here
public
update() : void