function user_service_save_access in Services 6.2
Same name and namespace in other branches
- 6 services/user_service/user_service.inc \user_service_save_access()
- 7 services/user_service/user_service.inc \user_service_save_access()
Check if the services account is allowed to create or edit user data.
Parameters
$account: An array of user account information (note that UID is the only property used.)
1 string reference to 'user_service_save_access'
- user_service_service in services/
user_service/ user_service.module - Implementation of hook_service().
File
- services/
user_service/ user_service.inc, line 228 - Link general user functionalities to services module.
Code
function user_service_save_access($account) {
global $user;
return empty($account['uid']) && user_access('create new users') || $user->uid == $account['uid'] && user_access('update own user data') || $user->uid != $account['uid'] && user_access('update any user data');
}