You are here

function shoutbox_user_get_current_uid in Shoutbox 7

Same name and namespace in other branches
  1. 6.2 shoutbox_user/shoutbox_user.module \shoutbox_user_get_current_uid()
  2. 7.2 shoutbox_user/shoutbox_user.module \shoutbox_user_get_current_uid()

Determine the user ID of the user we're viewing

Return value

The user id being viewed, otherwise FALSE is we're not viewing one

1 call to shoutbox_user_get_current_uid()
shoutbox_user_shoutbox in shoutbox_user/shoutbox_user.module
Implements hook_shoutbox().

File

shoutbox_user/shoutbox_user.module, line 129

Code

function shoutbox_user_get_current_uid() {

  // Detect user/%uid
  if (arg(0) == 'user' && is_numeric(arg(1))) {
    return arg(1);

    // TODO: (disterics) Do we really want this
  }
  else {
    if (arg(0) == 'shoutbox' && arg(1) == 'user' && is_numeric(arg(2))) {
      return arg(2);
    }
  }
  return FALSE;
}