function user_service_get_access in Services 7
Same name and namespace in other branches
- 6 services/user_service/user_service.inc \user_service_get_access()
- 6.2 services/user_service/user_service.inc \user_service_get_access()
Check if the user is allowed to get the user data.
Parameters
$uid: Number. The user ID.
1 string reference to 'user_service_get_access'
- user_service_service in services/
user_service/ user_service.module - Implementation of hook_service().
File
- services/
user_service/ user_service.inc, line 59 - @author Services Dev Team
Code
function user_service_get_access($uid) {
global $user;
return $user->uid == $uid && user_access('get own user data') || $user->uid != $uid && user_access('get any user data');
}