You are here

function user_service_delete_access in Services 6.2

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

Check to see if the services account is allowed to delete a user.

Parameters

$uid: UID of the user to be deleted.

1 string reference to 'user_service_delete_access'
user_service_service in services/user_service/user_service.module
Implementation of hook_service().

File

services/user_service/user_service.inc, line 33
Link general user functionalities to services module.

Code

function user_service_delete_access($uid) {
  global $user;
  return $user->uid == $uid && user_access('delete own user') || $user->uid != $uid && user_access('delete any user');
}