function shoutbox_user_get_current_uid in Shoutbox 6.2
Same name and namespace in other branches
- 7.2 shoutbox_user/shoutbox_user.module \shoutbox_user_get_current_uid()
- 7 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 - Implementation of hook_shoutbox()
File
- shoutbox_user/
shoutbox_user.module, line 122
Code
function shoutbox_user_get_current_uid() {
// Detect user/%uid
if (arg(0) == 'user' && is_numeric(arg(1))) {
return arg(1);
}
else {
if (arg(0) == 'shoutbox' && arg(1) == 'user' && is_numeric(arg(2))) {
return arg(2);
}
}
return FALSE;
}