\apex\users\workeruser

Handles all the worker related user functions, such as creating a user account, updating a profile, etc.

Summary

Methods
Properties
Constants
create()
verify_email()
add_note()
update_status()
update_group()
load()
update_sec_auth_hash()
update()
delete()
change_password()
reset_password()
No public properties found
No constants found
send_emails()
No protected properties found
N/A
add_log()
$emailer
N/A

Properties

Methods

create()

create(\apex\users\worker\EventMessageInterface  $msg,\apex\app\sys\encrypt  $encrypt,\apex\app\msg\alerts  $alerts)

Create a new user.

Parameters

\apex\users\worker\EventMessageInterface $msg

The message that was dispatched.

\apex\app\sys\encrypt $encrypt

The /app/utils/encrypt.php class. Injected.

\apex\app\msg\alerts $alerts

The /app/msg/alerts.php class. Injected.

verify_email()

verify_email(\apex\app\interfaces\msg\EventMessageInterface  $msg)

Verify user e-mail address

Verify user's e-mail address. If settings ar on, will send an e-mail to the user asking them to click on a verification link.

Parameters

\apex\app\interfaces\msg\EventMessageInterface $msg

add_note()

add_note(\apex\users\worker\EventMessageInterface  $msg)

Add note to user's account

Parameters

\apex\users\worker\EventMessageInterface $msg

The message that was dispatched.

update_status()

update_status(\apex\users\worker\EventMessageInterface  $msg)

Update user status

Parameters

\apex\users\worker\EventMessageInterface $msg

The message that was dispatched.

update_group()

update_group(\apex\users\worker\EventMessageInterface  $msg)

Update user group

Parameters

\apex\users\worker\EventMessageInterface $msg

The message that was dispatched.

load()

load(\apex\users\worker\EventMessageInterface  $msg)

Load a user's full profile

Parameters

\apex\users\worker\EventMessageInterface $msg

The message that was dispatched.

update_sec_auth_hash()

update_sec_auth_hash(string  $data)

Update secondary auth hash

Parameters

string $data

The data.

update()

update(\apex\users\worker\EventMessageInterface  $msg)

Update user profile

Parameters

\apex\users\worker\EventMessageInterface $msg

The message that was dispatched.

delete()

delete(\apex\users\worker\EventMessageInterface  $msg)

Delete a user

Parameters

\apex\users\worker\EventMessageInterface $msg

The message that was dispatched.

change_password()

change_password(\apex\users\worker\EventMessageInterface  $msg,\apex\app\sys\encrypt  $encrypt)

Change user password

Parameters

\apex\users\worker\EventMessageInterface $msg

The message that was dispatched.

\apex\app\sys\encrypt $encrypt

The /app/utils/encrypt.php class. Injected.

reset_password()

reset_password(\apex\app\interfaces\msg\EventMessageInterface  $msg,\apex\app\msg\emailer  $emailer)

Reset password

Reset password. Will create a reset URL, and e-mail to any users that existin in the database with the provided e-mail address

Parameters

\apex\app\interfaces\msg\EventMessageInterface $msg
\apex\app\msg\emailer $emailer

send_emails()

send_emails(integer  $userid,string  $action)

Send e-mail notifications

Parameters

integer $userid

The ID# of the user

string $action

The action being performed (eg. create, delete, etc.)

add_log()

add_log(integer  $userid,string  $added_by,string  $action,string  $reference_id = '')

Add a log

Parameters

integer $userid

The ID# of the user

string $added_by

Who the log is being added by (eg. user:42, admin:2, etc.)

string $action

The action being performed.

string $reference_id

Optional reference ID / text of the action.