User

Extends \AppModel

Users Model

Users can either be of type admin or basic. Information about the user's name and email are stored inside their account as well as login information.

author

Russell Toris - rctoris@wpi.edu

copyright

2014 Worcester Polytechnic Institute

link

https://github.com/WPI-RAIL/rms

since

RMS v 2.0.0

version 2.0.9
package

app.Model

Methods

After saving a new user, create a subscription settings entry.

afterSave(boolean $created = false, array $options = array()) : boolean

Arguments

$created

boolean

If the save was a creation or update.

$options

array

Unused in this implementation.

Response

boolean

If the save was successful.

Check if a new password was provided. If so, hash the password and store it.

beforeSave(array $options = array()) : boolean

Arguments

$options

array

Unused in this implementation.

Response

boolean

If the save was successful.

Check if a field is equal to another. This is useful for password validations.

equalToField(string $check, string $otherField) : boolean
inherited

Arguments

$check

string

The name of the field to check.

$otherField

string

The name of the other field to check with the first one.

Response

boolean

Returns if the two fields have equal contents.

Properties

The validation criteria for the model.

validate : array
var

Type(s)

array

All users belong to a single role.

belongsTo : string
var

Type(s)

string

All users have a single subscription setting.

hasOne : array
var

Type(s)

array

Users have multiple appointments.

hasMany : string
var

Type(s)

string