You are here

function me_uid_optional_load in me aliases 7

Same name and namespace in other branches
  1. 8 me.module \me_uid_optional_load()
  2. 6.2 me.module \me_uid_optional_load()
  3. 6 me.module \me_uid_optional_load()

Menu load callback in place of user_uid_optional_load().

File

./me.module, line 387
Provides 'me' aliases to allow users to enter 'me' in common paths instead of their user id.

Code

function me_uid_optional_load($uid, &$map = NULL, $index = NULL, $map_index = FALSE) {
  if (!isset($uid)) {
    if (!$GLOBALS['user']->uid) {
      return;
    }
    $uid = $GLOBALS['user']->uid;
  }
  $args = func_get_args();
  return _me_load_arguments($uid, $map, $index, $map_index, $args);
}