[svn r10003] bugfix for replacing $_uid with $_user['user_id']

skala
Patrick Cool 19 years ago
parent f8a8ff3c51
commit bdba62ad53
  1. 9
      main/inc/lib/main_api.lib.php

@ -344,14 +344,15 @@ function api_get_path($path_type)
} }
/** /**
* note: this function was deprecated but turned out to be quite useful for * This function returns the id of the user which is stored in the $_user array.
* API functions, so it will remain here.
* *
* @return the id of the current user * @example The function can be used to check if a user is logged in
* if (api_get_user_id())
* @return integer the id of the current user
*/ */
function api_get_user_id() function api_get_user_id()
{ {
return $GLOBALS[$_user['user_id']]; return $GLOBALS[$_user]['user_id'];
} }
/** /**
* @param $user_id (integer): the id of the user * @param $user_id (integer): the id of the user

Loading…
Cancel
Save