controllers / account.php
Account
Controller
Manages everything account related. Covers logging and logging out, permissions, groups, account settings, creating new accounts, and recovering passwords. Specifically to be used by individual accounts; for managing lists of permissions, users, and groups, use the Users controller.
public
forgotpass
(
)
public
forgotpass
(
)
Send message to provided email to aid in recovering account with forgotten password.
email |
POST
/api/v2/account/forgot
public
groups
(
)
public
groups
(
)
Return currently logged in user groups.
group_names_array
GET
/api/v2/account/groups
public
key_delete
(
)
public
key_delete
(
)
Delete App Key for currently logged in user. Requires 'manage_appkeys' permission. Connects to users model.
id |
is_deleted?
DELETE
/api/v2/account/key/(:id:)
public
key_load
(
)
public
key_load
(
)
Load App Keys for currently logged in user. Requires 'manage_appkeys' permission. Connects to users model.
appkeys
GET
/api/v2/account/key
public
key_new
(
)
public
key_new
(
)
Generate a new App Key for the logged in user. Requires the 'manage_appkeys' permission. Connects to the users model.
[id, name, key]
POST
/api/v2/account/key
public
key_permissions_save
(
)
public
key_permissions_save
(
)
Save App Key permissions. Requires 'manage_appkeys' permission. Connects to users model.
id |
|
permissions |
PUT
/api/v2/account/key/(:id:)
public
login
(
)
public
login
(
)
Login using the provided username and password.
username |
|
password |
[id, key, key_expiry]
POST
/api/v2/account/login
public
logout
(
)
public
logout
(
)
Logout currently logged in user.
POST
/api/v2/account/logout
public
newaccount
(
)
public
newaccount
(
)
Create a new account using the provided fields if user registration is currently enabled, and all the fields are validated.
name |
|
email |
|
username |
POST
/api/v2/account/new
public
permissions
(
)
public
permissions
(
)
Return currently logged in user permissions.
permission_array
GET
/api/v2/account/permissions
public
settings
(
)
public
settings
(
)
Return userdata (except for sensitive information) for currently logged in user.
user_fields_array
GET
/api/v2/account/settings
public
store
(
)
public
store
(
)
Get or save arbitrary string data associated with the logged in account. Used for UI/client settings, etc. Only returns value when getting (not saving).
name |
|
value |
value
public
store_all
(
)
public
store_all
(
)
Get all saved account settings.
values
public
uid
(
)
public
uid
(
)
Return currently logged in username and user id.
[id, username]
GET
/api/v2/account/uid
public
update_settings
(
)
public
update_settings
(
)
Update currently logged in user settings.
name |
|
password |
|
password_again |
|
email |
|
display_name |
|
language |
|
theme |
|
dyslexia_friendly_font |
Boolean set to TRUE for using a dyslexia-friendly font. |
sidebar_display_left |
Boolean set to TRUE when displaying the sidebar on the left side. |
PUT
/api/v2/account/settings