[svn r14331] Added call to api_set_anonymous() in api_get_anonymous() if conditions are met

skala
Yannick Warnier 17 years ago
parent a530cb3b06
commit 36e6bc9399
  1. 13
      main/inc/lib/main_api.lib.php

@ -1546,6 +1546,17 @@ function api_is_anonymous($user_id=null,$db_check=false)
else
{
global $_user;
if(!isset($_user)){
//in some cases, api_set_anonymous doesn't seem to be
//triggered in local.inc.php. Make sure it is.
//Occurs in agenda for admin links - YW
global $use_anonymous;
if(isset($use_anonymous) && $use_anonymous == true)
{
api_set_anonymous();
}
return true;
}
if(isset($_user['is_anonymous']) and $_user['is_anonymous'] === true)
{
return true;
@ -2130,4 +2141,4 @@ function api_chmod_R($path, $filemode) {
return FALSE;
}
?>
?>

Loading…
Cancel
Save