user_uid_optional_to_arg
Definition
user_uid_optional_to_arg($arg)
modules/user/user.module, line 1169
Description
Returns the user id of the currently logged in user.
Code
<?php
function user_uid_optional_to_arg($arg) {
// Give back the current user uid when called from eg. tracker, aka.
// with an empty arg. Also use the current user uid when called from
// the menu with a % for the current account link.
return empty($arg) || $arg == '%' ? $GLOBALS['user']->uid : $arg;
}
?> 