User
class User extends BaseModel
Base user model
Traits
Properties
int | $id | ID | |
string | $uuid | UUID | |
string | $name | User name (full name) | |
string | $slug | Slug | |
string | User email | ||
string | $phone | User phone | |
string | $password | User's (hashed) password | |
string | $sessid | Session id, unused in API | |
string | $session_salt | Session cryptographic salt | |
string | $settings | Settings, stored as json encoded string | |
string | $public_key | Public API key | |
string | $private_key | Private api key | |
boolean | $is_snworks | Is SNworks flag | |
boolean | $status | User status | |
boolean | $is_service | Is a Service User | |
boolean | $can_receive_email | Can user receive email |
Methods
Phalcon has this bug where if you enumerate a relation then try to set it via the magic setter, it won't save.
Return model's SRN. Model should implement a 'srn_name' protected value.
Find first instance by SRN
Initialize method for model.
No description
No description
No description
No description
No description
Returns table name mapped in the model.
Allows to query a set of records that match the specified conditions
Allows to query the first record that match the specified conditions
No description
toArray override to hide things like, you know, hashed passwords. Notice there are no related options for users.
Details
in BaseModel at line line 13
getResultsetClass()
in BaseModel at line line 25
boolean
hasProperty(string $str)
Determine if the model has a public property.
Useful in determining valid sorting options on the front end.
in BaseModel at line line 40
BaseModel
setRelated(string $relation, mixed $value = array())
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...
in Srnable at line line 18
string
getSrn()
Return model's SRN. Model should implement a 'srn_name' protected value.
Otherwise, this will pull from the 'getSource' method
at line line 332
User
findFirstBySrn(string $srn)
Find first instance by SRN
at line line 134
initialize()
Initialize method for model.
at line line 185
beforeValidation()
at line line 208
validation()
at line line 241
beforeDelete()
at line line 252
afterUpdate()
at line line 267
beforeSave()
at line line 299
string
getSource()
Returns table name mapped in the model.
at line line 310
static User[]
find(mixed $parameters = null)
Allows to query a set of records that match the specified conditions
at line line 321
static User
findFirst(mixed $parameters = null)
Allows to query the first record that match the specified conditions
at line line 339
hasRole($role)
at line line 355
array
toArray($opts = array())
toArray override to hide things like, you know, hashed passwords. Notice there are no related options for users.