Properties

$id

$id : integer

ID

Type

integer

$uuid

$uuid : string

UUID

Type

string

$name

$name : string

User name (full name)

Type

string

$slug

$slug : string

Slug

Type

string

$email

$email : string

User email

Type

string

$phone

$phone : string

User phone

Type

string

$password

$password : string

User's (hashed) password

Type

string

$sessid

$sessid : string

Session id, unused in API

Type

string

$session_salt

$session_salt : string

Session cryptographic salt

Type

string

$settings

$settings : string

Settings, stored as json encoded string

Type

string

$public_key

$public_key : string

Public API key

Type

string

$private_key

$private_key : string

Private api key

Type

string

$is_snworks

$is_snworks : boolean

Is SNworks flag

Type

boolean

$status

$status : boolean

User status

Type

boolean

$is_service

$is_service : boolean

Is a Service User

Type

boolean

$can_receive_email

$can_receive_email : boolean

Can user receive email

Type

boolean

$srn_name

$srn_name : string

Resource name for SRN

Type

string

Methods

getSrn()

getSrn() : string

Return model's SRN. Model should implement a 'srn_name' protected value.

Otherwise, this will pull from the 'getSource' method

Returns

string —

SRN

findFirstBySrn()

findFirstBySrn(string  $srn) : \Ceo\Core\Models\User

Find first instance by SRN

Parameters

string $srn

Returns

\Ceo\Core\Models\User

getResultsetClass()

getResultsetClass() 

hasProperty()

hasProperty(string  $str) : boolean

Determine if the model has a public property.

Useful in determining valid sorting options on the front end.

Parameters

string $str

Property

Returns

boolean

setRelated()

setRelated(string  $relation, mixed  $value = array()) : self

Phalcon has this bug where if you enumerate a relation then try to set it via the magic setter, it won't save.

I think it has something to do with implicit transactions, but I'm not entirely sure...

Parameters

string $relation
mixed $value

Returns

self

initialize()

initialize() 

Initialize method for model.

beforeValidation()

beforeValidation() 

validation()

validation() 

beforeDelete()

beforeDelete() 

afterUpdate()

afterUpdate() 

beforeSave()

beforeSave() 

getSource()

getSource() : string

Returns table name mapped in the model.

Returns

string

find()

find(mixed  $parameters = null) : array<mixed,\Ceo\Core\Models\User>

Allows to query a set of records that match the specified conditions

Parameters

mixed $parameters

Returns

array<mixed,\Ceo\Core\Models\User>

findFirst()

findFirst(mixed  $parameters = null) : \Ceo\Core\Models\User

Allows to query the first record that match the specified conditions

Parameters

mixed $parameters

Returns

\Ceo\Core\Models\User

hasRole()

hasRole(  $role) 

Parameters

$role

toArray()

toArray(  $opts = array()) : array

toArray override to hide things like, you know, hashed passwords. Notice there are no related options for users.

Parameters

$opts

Returns

array

toArrayRelated()

toArrayRelated(  $ops,   $array) 

Parameters

$ops
$array