You are here

function user_service_save_access in Services 6

Same name and namespace in other branches
  1. 6.2 services/user_service/user_service.inc \user_service_save_access()
  2. 7 services/user_service/user_service.inc \user_service_save_access()

Check if the user is allowed to get the user data.

Parameters

$uid: Number. The user ID.

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 139
@author Services Dev Team

Code

function user_service_save_access($account) {
  global $user;
  return empty($account->uid) and user_access('create new users') or $user->uid == $account->uid and user_access('update own user data') or $user->uid != $account->uid and user_access('update any user data');
}