diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-06 08:51:23 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-11-06 08:51:23 +0000 |
commit | 856ae39d357232d1c44b64123009858b7305aec9 (patch) | |
tree | e253d535698d3e30d54295331832120c5975dcf0 /modules/user/user.module | |
parent | 73d88aa9292890ab95e81e2130ccb7da74a87235 (diff) | |
download | brdo-856ae39d357232d1c44b64123009858b7305aec9.tar.gz brdo-856ae39d357232d1c44b64123009858b7305aec9.tar.bz2 |
#186903 by marcingy, Rob Loach and chx: (regression) restore my recent posts functionality in tracker
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 15df4959b..69c4b77a8 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -1076,15 +1076,17 @@ function user_init() { } function user_current_load($arg) { - return $arg ? user_load($arg) : FALSE; + return user_load($arg ? $arg : $GLOBALS['user']->uid); } +/** + * Returns the user id of the currently logged in user. + */ function user_current_to_arg($arg) { - - if (is_numeric($arg)) { - return $arg; - } - return $GLOBALS['user']->uid; + // 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; } /** |