array( 'file' => array('type' => 'inc', 'module' => 'user_resource'), 'retrieve' => array( 'help' => 'Retrieves a user', 'callback' => '_user_resource_retrieve', 'access arguments' => array('access user profiles'), // this is probably not enough, doesn't block things like pass and email 'access arguments append' => TRUE, 'args' => array( array( 'name' => 'uid', 'type' => 'int', 'description' => 'The uid of the user to retrieve.', 'source' => array('path' => '0'), 'optional' => FALSE, 'default value' => NULL, ), ), ), ), 'actions' => array( 'login' => array( 'help' => 'Login a user for a new session', 'callback' => '_user_resource_login', 'args' => array( array( 'name' => 'username', 'type' => 'string', 'description' => 'A valid username', 'source' => array('data'), 'optional' => FALSE, ), array( 'name' => 'password', 'type' => 'string', 'description' => 'A valid password', 'source' => array('data'), 'optional' => FALSE, ), ), ), 'logout' => array( 'help' => 'Logout a user session', 'callback' => '_user_resource_logout', 'args' => array( array( ), ), ), ), ); }