Class Socialveo\WebApi\Controllers\UsersController

InheritanceSocialveo\WebApi\Controllers\UsersController » Socialveo\WebApi\Controllers\RestApiController » Phalcon\Mvc\Controller
Uses TraitsSocialveo\Core\Translatable

Class UsersController

Public Methods

Hide inherited methods

MethodDescriptionDefined By
_handleException() Handle exceptions Socialveo\WebApi\Controllers\RestApiController
_t() Gets translations Socialveo\Core\Translatable
activationLinkAction() Activate user account by email Socialveo\WebApi\Controllers\UsersController
activationSmsAction() Activate user account by SMS Socialveo\WebApi\Controllers\UsersController
afterExecuteRoute() After execute route, change return value to json Socialveo\WebApi\Controllers\RestApiController
beforeExecuteRoute() Before execute route, remove extra params Socialveo\WebApi\Controllers\RestApiController
changeEmailAction() Change profile email Socialveo\WebApi\Controllers\UsersController
checkClientCredentials() Checks client credentials Socialveo\WebApi\Controllers\RestApiController
checkEmailsAction() Check if emails is already registered Socialveo\WebApi\Controllers\UsersController
confirmEmailAction() Confirm user email Socialveo\WebApi\Controllers\UsersController
confirmEmailRepeatAction() Sends new confirmation mail to logged user Socialveo\WebApi\Controllers\UsersController
connectionsAction() Get user connections Socialveo\WebApi\Controllers\UsersController
createAction() Create user (registration) Socialveo\WebApi\Controllers\UsersController
decrypt() Decrypt value Socialveo\WebApi\Controllers\RestApiController
deleteAction() Remove User resource Socialveo\WebApi\Controllers\UsersController
encrypt() Encrypt value Socialveo\WebApi\Controllers\RestApiController
followersAction() Get user followers (1-way connected) Socialveo\WebApi\Controllers\UsersController
followingsAction() Get user followings (1-way connection, where user follow) Socialveo\WebApi\Controllers\UsersController
getAction() Get user Socialveo\WebApi\Controllers\UsersController
getArrayFromParam() Returns array from params Socialveo\WebApi\Controllers\RestApiController
getLanguage() Gets language code Socialveo\WebApi\Controllers\RestApiController
getParams() Gets request params for Socialveo::filteredFind() Socialveo\WebApi\Controllers\RestApiController
getRequestData() Returns request data Socialveo\WebApi\Controllers\RestApiController
getRequiredParam() Get required param Socialveo\WebApi\Controllers\RestApiController
getSocialProfilesAction() Get user social profiles Socialveo\WebApi\Controllers\UsersController
getToken() Get token Socialveo\WebApi\Controllers\RestApiController
getTranslation() Gets translations Socialveo\WebApi\Controllers\RestApiController
handleError() Handle errors Socialveo\WebApi\Controllers\RestApiController
handleException() Handle exceptions Socialveo\WebApi\Controllers\RestApiController
importAction() Import users, send email invitations to email addresses in an uploaded CSV file Socialveo\WebApi\Controllers\UsersController
initialize() Initialize controller Socialveo\WebApi\Controllers\RestApiController
invalidMethodAction() Action trigger when invalid action tried run Socialveo\WebApi\Controllers\RestApiController
invitationsAction() Invite users to site via email Socialveo\WebApi\Controllers\UsersController
karmaAction() Get user karma events Socialveo\WebApi\Controllers\UsersController
listAction() Get public user profiles Socialveo\WebApi\Controllers\UsersController
meAction() Get the currently logged in user resource Socialveo\WebApi\Controllers\UsersController
networksAction() Get user networks Socialveo\WebApi\Controllers\UsersController
notFoundAction() Not found action Socialveo\WebApi\Controllers\RestApiController
notificationsAction() Get user notifications Socialveo\WebApi\Controllers\UsersController
posts() Gets posts Socialveo\WebApi\Controllers\RestApiController
postsAction() Get posts posted by user Socialveo\WebApi\Controllers\UsersController
recoveryPasswordAction() Processes a password recovery request Socialveo\WebApi\Controllers\UsersController
replaceParam() Replace param Socialveo\WebApi\Controllers\RestApiController
resetPasswordAction() Reset user password request Socialveo\WebApi\Controllers\UsersController
respondWithItem() Response with item // * @deprecated Socialveo\WebApi\Controllers\RestApiController
sendJsonContent() Send response as json content and exit Socialveo\WebApi\Controllers\RestApiController
sendJsonContentRaw() Send json content Socialveo\WebApi\Controllers\RestApiController
sendJsonContentRawStatic() Send json content static Socialveo\WebApi\Controllers\RestApiController
setDefaultParam() Set default option Socialveo\WebApi\Controllers\RestApiController
t() Gets translations Socialveo\Core\Translatable
unsetParam() Unset get param Socialveo\WebApi\Controllers\RestApiController
updateAction() Update user Socialveo\WebApi\Controllers\UsersController
updatePasswordAction() Change User password Socialveo\WebApi\Controllers\UsersController
updateStatusAction() Change user status Socialveo\WebApi\Controllers\UsersController
usersAction() Get users connected to given user (friends) (2-way connection) Socialveo\WebApi\Controllers\UsersController

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
checkAccess() Checks during the init of controller whether user is a guest. Socialveo\WebApi\Controllers\RestApiController
log() Log full request data for debug Socialveo\WebApi\Controllers\RestApiController
objectsToArray() Convert objects to arrays Socialveo\WebApi\Controllers\RestApiController

Method Details

activationLinkAction() public method

Activate user account by email

/users/{user_uuid}/activation

Method: GET

Access: Owner

Parameters:

{user_uuid} required string user uuid
activation_code required string activation code

Affects: User

Returns: bool

Sample response:

{
    "status": "OK",
    "timestamp": 1234567890
}

public mixed activationLinkAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

activationSmsAction() public method

Activate user account by SMS

Notice. This action is disabled, the reasons can be: not implemented, unsafe, duplicated or deprecated (autodetect: disabled in the router)
/users/{user_uuid}/activation

Method: POST

Access: Owner

Parameters:

{user_uuid} required string user uuid

Affects: User

Returns: bool

Sample response:

This action produces no output.
public mixed activationSmsAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

changeEmailAction() public method

Change profile email

/users/{user_uuid}/change-email

Method: POST

Access: Owner

Parameters:

{user_uuid} required string, user uuid
email required string, new email
password required string, user password

Sample response:

{
    "status": "OK",
    "timestamp": 1234567890
}

public mixed changeEmailAction ( $user_uuid )
$user_uuid
throws Exception
checkEmailsAction() public method

Check if emails is already registered

/users/checkEmails

Method: POST

Access: Logged

Parameters:

emails required array or come separated email addresses, to which invitations are to be sent

Sample response:

{
    'status': 'OK',
    "data":[
        {"email": "john-doe@hotmail.com", "status": "registered"},
        {"email": "jane-doe@hotmail.com", "status": "invited"},
        ...
    ]
    "timestamp": 1234567890
}

public mixed checkEmailsAction ( )
confirmEmailAction() public method

Confirm user email

/users/confirm-email/{validation_code}

Method: POST

Access: Logged

Parameters:

validation_code required string The validation hash from email
language optional string language code

Sample response:

{
    "status": "OK",
    "timestamp": 1234567890
}

public mixed confirmEmailAction ( $validation_code )
$validation_code string

The validation hash from email

confirmEmailRepeatAction() public method

Sends new confirmation mail to logged user

/users/confirm-email/repeat

Method: POST

Access: Logged

Parameters:

language optional string language code

Sample response:

{
    "status": "OK",
    "timestamp": 1234567890
}

public mixed confirmEmailRepeatAction ( )
connectionsAction() public method

Get user connections

/users/{user_uuid}/connections

Method: GET

Access: Owner, UserHasAccess

Parameters:

{user_uuid} required string, user uuid
page or offset optional integer, page start or offset
limit optional integer, page limit
sortby[property]=order optional sort by property value, order either desc or asc
filterby[property][operator]=value optional filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), like

Filter by: Connection

Returns: Connection []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "connection", "uuid": "16813358-44c8-11e7-bc57-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "connection", "uuid": "e464dcec-45a0-11e7-b89e-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "connection", "uuid": "f36ed832-5694-11e7-842a-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "connection", "uuid": "5098aa9c-6ac2-11e7-8b6f-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        ...
    ],
    "count":{"offset": 0, "limit": 10, "total": 12},
    "timestamp": 1234567890
}

public mixed connectionsAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

createAction() public method

Create user (registration)

/users/create

Method: POST

Access: Public

Parameters:

username required string username (also called screenname), may contain only alphanumeric character, dashes, underscores and periods
password required string user password
email required string user email address
language_code optional string language code (example en_US, it_IT, de_DE)
firstname optional string user firstname
lastname optional string user firstname
language optional string language code

Affects: User

Returns: User

Sample response:

{
    "status": "OK",
    "data":{
        "type": "users",
        "uuid": "52a705ec-6acf-11e7-803d-54bef75c7a3f",
        "network_uuid": "52aae8d8-6acf-11e7-a6d0-54bef75c7a3f",
        ...
    },
    "timestamp": 1234567890
}

public mixed createAction ( )
deleteAction() public method

Remove User resource

/users/{user_uuid}/delete

Method: POST

Access: Owner

Parameters:

{user_uuid} required string user uuid
language optional string language code

Affects: User

Returns: bool

Sample response:

{
    "status": "OK",
    "timestamp": 1234567890
}

public mixed deleteAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

followersAction() public method

Get user followers (1-way connected)

/users/{user_uuid}/followers

Method: GET

Access: Owner, UserHasAccess

Parameters:

{user_uuid} required string, user uuid
page or offset optional integer, page start or offset
limit optional integer, page limit
sortby[property]=order optional sort by property value, order either desc or asc
filterby[property][operator]=value optional filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), like

Filter by: Connection

Returns: User []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "user", "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f", "network_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",…},
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        ...
    ],
    "count":{"offset": 0, "limit": 10, "total": 12},
    "timestamp": 1234567890
}

public mixed followersAction ( $user_uuid )
$user_uuid string

User UUID is passed in the request URI

throws Exception
followingsAction() public method

Get user followings (1-way connection, where user follow)

/users/{user_uuid}/followings

Method: GET

Access: Owner, UserHasAccess

Parameters:

{user_uuid} required string, user uuid
page or offset optional integer, page start or offset
limit optional integer, page limit
sortby[property]=order optional sort by property value, order either desc or asc
filterby[property][operator]=value optional filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), like

Filter by: Connection

Returns: User []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "user", "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f", "network_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",…},
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        ...
    ],
    "count":{"offset": 0, "limit": 10, "total": 12},
    "timestamp": 1234567890
}

public mixed followingsAction ( $user_uuid )
$user_uuid string

User UUID is passed in the request URI

throws Exception
getAction() public method

Get user

/users/{user_uuid}/get

Method: GET

Access: Owner, UserHasAccess

Parameters:

{user_uuid} required string user uuid
language optional string language code

Returns: User

Sample response:

{
    "status": "OK",
    "data":{
        "type": "users",
        "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f",
        "network_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",
        ...
    },
    "timestamp": 1234567890
}

public mixed getAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

getSocialProfilesAction() public method

Get user social profiles

/users/{user_uuid}/social-profiles

Method: GET

Access: Owner

Parameters:

{user_uuid} required string, user uuid

Returns: UserSocialProfile []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "user_social_profile", "uuid": "9a6f6dde-6b5f-11e7-9ee9-54bef75c7a3f", "provider": "Facebook",…},
        {"type": "user_social_profile", "uuid": "b523f238-4efb-11e7-a4c3-54bef75c7a3f", "provider": "Facebook",…},
        {"type": "user_social_profile", "uuid": "ad8d267a-4efb-11e7-ab85-54bef75c7a3f", "provider": "Google",…},
        {"type": "user_social_profile", "uuid": "ad8d267a-4efb-11e7-ab85-54bef75c7a3f", "provider": "Google",…},
        ...
    ],
    "count":{"total": 12},
    "timestamp": 1234567890
}

public mixed getSocialProfilesAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

importAction() public method

Import users, send email invitations to email addresses in an uploaded CSV file

Notice. This action is disabled, the reasons can be: not implemented, unsafe, duplicated or deprecated (autodetect: disabled in the router)
/users/{user_uuid}/import

Method: POST

CAUTION: Request content-type has to be *multipart/form-data*

Parameters:

file required CSV file to be uploaded and processed

Sample response:

{
    'status': 'OK',
    "timestamp": 1234567890
}

public mixed importAction ( $user_uuid )
$user_uuid

The UUID is passed in the request URI

invitationsAction() public method

Invite users to site via email

/users/{user_uuid}/invitations

Method: POST

Access: Owner

Parameters:

{user_uuid} required string, user uuid
emails required array or come separated email addresses, to which invitations are to be sent

Sample response:

{
    'status': 'OK'
    "timestamp": 1234567890
}

public mixed invitationsAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

karmaAction() public method

Get user karma events

/users/{user_uuid}/karma

Method: GET

Access: Owner, UserHasAccess

Parameters:

{user_uuid} required string user uuid
page or offset optional integer page start or offset
limit optional integer page limit
sortby[property]=order optional array sort by property value, order either desc or asc
filterby[property][operator]=value optional array filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), like

Filter by: Karma

Returns: Karma []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "karma", "uuid": "9a6f6dde-6b5f-11e7-9ee9-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "karma", "uuid": "b523f238-4efb-11e7-a4c3-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "karma", "uuid": "ad8d267a-4efb-11e7-ab85-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "karma", "uuid": "2da8744c-4efa-11e7-92bf-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        ...
    ]
    "timestamp": 1234567890
}

public mixed karmaAction ( $user_uuid )
$user_uuid string

User UUID is passed in the request URI

listAction() public method

Get public user profiles

/users

Method: GET

Access: Public

Parameters:

uuids optional string or array users uuids separated by coma, or array with user uuids
page or offset optional integer page start or offset
limit optional integer page limit
sortby[property]=order optional array sort by property value, order either desc or asc
filterby[property][operator]=value optional array filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), ne(<>), like
embed optional mixed allows to include one or more child resource(s) in the response
uuids optional array or string list of item UUIDs to fetch, array or string separated by commas. when used, no other parameters can be utilized
language optional string language code

Filter by: User

Returns: User []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "users", "uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f", "network_uuid": "a66b8654-14a8-11e6-af87-54bef75c7a3f",…},
        {"type": "users", "uuid": "5a15e760-27ed-11e6-8d4a-54bef75c7a3f", "network_uuid": "5ac94e9a-27ed-11e6-9916-54bef75c7a3f",…},
        {"type": "users", "uuid": "0449c1f2-27f8-11e6-be68-54bef75c7a3f", "network_uuid": "04577e6e-27f8-11e6-b0cf-54bef75c7a3f",…},
        {"type": "users", "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f", "network_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",…},
        ...
    ],
    "count":{"offset": 0, "limit": 10, "total": 12},
    "timestamp": 1234567890
}

public mixed listAction ( )
meAction() public method

Get the currently logged in user resource

/users/me

Method: GET

Access: Logged

Parameters:

language optional string language code

Returns: User

Sample response:

{
    "status": "OK",
    "data":{
        "type": "users",
        "uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",
        "network_uuid": "a66b8654-14a8-11e6-af87-54bef75c7a3f",
        ...
    },
    "timestamp": 1234567890
}

public mixed meAction ( )
networksAction() public method

Get user networks

/users/{user_uuid}/networks

Method: GET

Access: Owner, UserHasAccess

Parameters:

{user_uuid} required string, user uuid
page or offset optional integer, page start or offset
limit optional integer, page limit
sortby[property]=order optional sort by property value, order either desc or asc
filterby[property][operator]=value optional filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), like

Filter by: Network

Returns: Network []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "network", "uuid": "91c4efe4-cb17-11e6-ae6b-54bef75c7a3f", "user_uuid": "91c033fa-cb17-11e6-b903-54bef75c7a3f",…},
        {"type": "network", "uuid": "25b857dc-8e22-11e6-b414-54bef75c7a3f", "user_uuid": "fba76d0c-8e21-11e6-baa1-54bef75c7a3f",…},
        {"type": "network", "uuid": "220eb10c-7e38-11e6-97c2-54bef75c7a3f", "user_uuid": "20213018-7e38-11e6-9cfa-54bef75c7a3f",…},
        {"type": "network", "uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f", "user_uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f",…},
        ...
    ]
    "timestamp": 1234567890
}

public mixed networksAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

notificationsAction() public method

Get user notifications

/users/{user_uuid}/notifications

Method: GET

Access: Owner

Parameters:

{user_uuid} required string, user uuid
page or offset optional integer, page start or offset
limit optional integer, page limit
sortby[property]=order optional sort by property value, order either desc or asc
filterby[property][operator]=value optional filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), like

Filter by: Notification

Returns: Notification []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "notification", "uuid": "c736726c-6b33-11e7-84d7-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "notification", "uuid": "93df5d7a-47fc-11e7-afa7-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "notification", "uuid": "0277ea8e-8b0d-11e6-9d45-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "notification", "uuid": "cbe4a70a-8b0c-11e6-b962-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        ...
    ],
    "count":{"offset": 0, "limit": 10, "total": 12},
    "timestamp": 1234567890
}

public mixed notificationsAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI

postsAction() public method

Get posts posted by user

/users/{user_uuid}/posts

Method: GET

Access: Owner, UserHasAccess

Parameters:

{user_uuid} required string user uuid
page or offset optional integer page start or offset (page=3&limit=10 the same as offset=20&limit=10)
limit optional integer page limit
sortby[property]=order optional array sort by property value, order either desc or asc
filterby[property][operator]=value optional array filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), like

Filter by: Post

Returns: Post []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "post", "uuid": "9a6f6dde-6b5f-11e7-9ee9-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "post", "uuid": "b523f238-4efb-11e7-a4c3-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "post", "uuid": "ad8d267a-4efb-11e7-ab85-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        {"type": "post", "uuid": "2da8744c-4efa-11e7-92bf-54bef75c7a3f", "user_uuid": "a479b438-14a8-11e6-ac83-54bef75c7a3f",…},
        ...
    ],
    "timestamp": 1234567890
}

public mixed postsAction ( $user_uuid )
$user_uuid string

The UUID is passed in the request URI

recoveryPasswordAction() public method

Processes a password recovery request

/users/password-recovery/{password_recovery_uuid}

Method: GET

Access: Public

Parameters:

{password_recovery_uuid} required string password recovery uuid

Affects: PasswordRecovery

Returns: PasswordRecovery

Sample response:

{
    'status': 'OK',
    "data":{
        "type": "password_recovery",
        "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f",
        "user_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",
        ...
    },
    "timestamp": 1234567890
}

public mixed recoveryPasswordAction ( $password_recovery_uuid )
$password_recovery_uuid string

Password recovery UUID is passed in the request URI.

resetPasswordAction() public method

Reset user password request

/users/password-reset

Method: POST

Access: Public

Parameters:

email required string user email

Affects: PasswordRecovery

Returns: PasswordRecovery

Sample response:

{
    'status': 'OK',
    "data":{
        "type": "password_recovery",
        "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f",
        "user_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",
        ...
    },
    "timestamp": 1234567890
}

public mixed resetPasswordAction ( )
updateAction() public method

Update user

/users/{user_uuid}/update

Method: POST

Access: Owner

Parameters:

{user_uuid} required string user uuid
pass optional string user password
firstname optional string user firstname
lastname optional string user firstname
email optional email user email address
language_code optional string language code
gender optional string gender (either 'male' or 'female')
availability optional string user availability status: available unavailable away busy dnd
mobile optional string mobile phone number (non-numeric characters will be stripped)
birthdate optional string birthdate in YYYY-MM-DD format
about optional text user about info
interests optional text user interests

Affects: User

Returns: User

Sample response:

{
    "status": "OK",
    "data":{
        "type": "user",
        "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f",
        "network_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",
        ...
    },
    "timestamp": 1234567890
}

public mixed updateAction ( $user_uuid )
$user_uuid

User uuid

updatePasswordAction() public method

Change User password

/users/{user_uuid}/password-update

Method: POST

Access: Owner

Parameters:

{user_uuid} required string user uuid
current_pass required string current user password
new_pass required string new password

Affects: User

Sample response:

{
    "status": "OK",
    "timestamp": 1234567890
}

public mixed updatePasswordAction ( $user_uuid )
$user_uuid

User UUID is passed in the request URI. In order to process the password change request, both current and new password strings have to be provided in the body of the request.

updateStatusAction() public method

Change user status

/users/{user_uuid}/status-update

Method: POST

Access: Owner

Parameters:

{user_uuid} required string user uuid
status required integer user status, 0 - inactive, 1 - active user, 2 - block user account, 3 - invisible (in search results), 4 - protected (only friends/followings can access profile)

Affects: User

Returns: User

Sample response:

{
    'status': 'OK',
    "data":{
        "type": "user",
        "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f",
        "network_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",
        ...
    },
    "timestamp": 1234567890
}

public mixed updateStatusAction ( $user_uuid )
$user_uuid string

The UUID is passed in the request URI

usersAction() public method

Get users connected to given user (friends) (2-way connection)

/users/{user_uuid}/users

Method: GET

Access: Owner, UserHasAccess

Parameters:

{user_uuid} required string, user uuid
page or offset optional integer, page start or offset
limit optional integer, page limit
sortby[property]=order optional sort by property value, order either desc or asc
filterby[property][operator]=value optional filter by given property, operator eq (=), gt (>), ge(>=), lt(<), le(<=), like

Filter by: User

Returns: User []

Sample response:

{
    "status": "OK",
    "data":[
        {"type": "user", "uuid": "4622f77e-27f8-11e6-98d1-54bef75c7a3f", "network_uuid": "4631a06c-27f8-11e6-94b3-54bef75c7a3f",…},
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        {"type": "user", "uuid": "4306270a-27fd-11e6-9bba-54bef75c7a3f", "network_uuid": "4364a38e-27fd-11e6-a56a-54bef75c7a3f",…}
        ...
    ],
    "count":{"offset": 0, "limit": 10, "total": 12},
    "timestamp": 1234567890
}

public mixed usersAction ( $user_uuid )
$user_uuid string

User UUID is passed in the request URI