You are here

function me_to_arg in me aliases 6

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

Menu to_arg function for %me.

2 calls to me_to_arg()
me_category_to_arg in ./me.module
Menu to_arg function for %me_category.
me_uid_optional_to_arg in ./me.module
Menu to_arg function for %me_uid_optional.

File

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

Code

function me_to_arg($arg, $map, $index) {
  $uid = user_uid_optional_to_arg($arg, $map, $index);
  if (me_variable_get('me_rewrite_link') && !_me_user_disabled()) {
    return $uid == $GLOBALS['user']->uid ? _me_get_me_alias() : $uid;
  }
  else {
    return $uid;
  }
}