function biblio_user_to_arg in Bibliography Module 6.2
Same name and namespace in other branches
- 6 biblio.module \biblio_user_to_arg()
Determines actual argument for %biblio_user placeholders in menu paths.
This function returns the current user ID when called from a module like tracker (aka with an empty arg). It also is used to get the current user ID when called from a menu item with a % for the current user account link.
Parameters
mixed $arg: A variable representing the user identifier.
Return value
mixed If $arg is empty or equal to '%', the user ID is returned; otherwise, the value of the input $arg variable is returned.
File
- ./
biblio.module, line 696 - Main file for Drupal module biblio.
Code
function biblio_user_to_arg($arg) {
return empty($arg) || $arg == '%' ? $GLOBALS['user']->uid : $arg;
}