You are here

function hosting_client_user in Hosting 5

Same name and namespace in other branches
  1. 6.2 client/hosting_client.access.inc \hosting_client_user()

Implementation of hook_user().

File

client/hosting_client.access.inc, line 10
Control client node access

Code

function hosting_client_user($op, &$edit, &$user, $category = NULL) {
  switch ($op) {
    case 'load':
      $user->client_id = hosting_get_client_from_user($user->uid);
      break;
    case 'view':
      return hosting_client_user_view($user);
    case 'form':
      return hosting_client_user_form($edit, $user, $category);
    case 'validate':
      return hosting_client_user_form_validate($edit);
    case 'insert':
    case 'update':
      hosting_client_user_form_submit($edit, $user);
      $edit['hosting_client'] = NULL;
      break;
    case 'submit':
      break;
    case 'delete':
      db_query('DELETE FROM {hosting_client_user} WHERE user = %d', $user->uid);
  }
}