user_service_service

  1. services
    1. 5
    2. 7
    3. 6.2
    4. 6
Versions
5 – 7 user_service_service()

Implementation of hook_service().

Code

services/user_service/user_service.module, line 35

<?php
function user_service_service() {
  return array(
    // user.delete
    array(
      '#method' => 'user.delete', 
      '#callback' => 'user_service_delete', 
      '#access callback' => 'user_service_delete_access', 
      '#file' => array('file' => 'inc', 'module' => 'user_service'), 
      '#args' => array(
        array(
          '#name' => 'uid', 
          '#type' => 'int', 
          '#description' => t('User ID.'),
        ),
      ), 
      '#return' => 'struct', 
      '#help' => t('Delete an user.'),
    ),
    // user.get
    array(
      '#method' => 'user.get', 
      '#callback' => 'user_service_get', 
      '#access callback' => 'user_service_get_access', 
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ), 
      '#args' => array(
        array(
          '#name' => 'uid', 
          '#type' => 'int', 
          '#description' => t('User ID.'),
        ),
      ), 
      '#return' => 'struct', 
      '#help' => t('Get all user details.'),
    ),
    // user.login
    array(
      '#method' => 'user.login', 
      '#callback' => 'user_service_login', 
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ), 
      '#args' => array(
        array(
          '#name' => 'username', 
          '#type' => 'string', 
          '#description' => t('A valid username.'),
        ),
        array(
          '#name' => 'password', 
          '#type' => 'string', 
          '#description' => t('A valid password.'),
        ),
      ), 
      '#return' => 'struct', 
      '#help' => t('Logs in a user.'),
    ),
    // user.logout
    array(
      '#method' => 'user.logout', 
      '#callback' => 'user_service_logout', 
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ), 
      '#args' => array(), 
      '#return' => 'struct', 
      '#help' => t('Logs out a user.'),
    ),
    // user.save
    array(
      '#method' => 'user.save', 
      '#callback' => 'user_service_save', 
      '#access callback' => 'user_service_save_access', 
      '#file' => array(
        'file' => 'inc',
        'module' => 'user_service',
      ), 
      '#args' => array(
        array(
          '#name' => 'account', 
          '#type' => 'struct', 
          '#description' => t('A user object.'),
        ),
      ), 
      '#return' => 'int', 
      '#help' => t('Save user details.'),
    ),
  );
}
?>