You are here

function user_service_delete in Services 6

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

Delete an user.

Parameters

$uid: Number. The user ID.

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

File

services/user_service/user_service.inc, line 14
@author Services Dev Team

Code

function user_service_delete($uid) {
  $account = user_load($uid);
  if (empty($account)) {
    return services_error(t('There is no user with such ID.'));
  }
  user_delete($account, $uid);

  // Everything went right.
  return TRUE;
}