You are here

function user_service_service in Services 5

Same name and namespace in other branches
  1. 6 services/user_service/user_service.module \user_service_service()
  2. 6.2 services/user_service/user_service.module \user_service_service()
  3. 7 services/user_service/user_service.module \user_service_service()

Implementation of hook_service().

File

services/user_service/user_service.module, line 22
The module which exposes services related to user activities

Code

function user_service_service() {
  return array(
    // user.login
    array(
      '#method' => 'user.login',
      '#callback' => 'user_service_login',
      '#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',
      '#args' => array(),
      '#return' => 'struct',
      '#help' => t('Logs out a user.'),
    ),
  );
}