X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=functions%2Fauth.php;h=6ce4e4a69f7c582e3d10ba496cda825a3ee7b645;hp=bebc7f87a1739de545b3c994428b94118c809ccb;hb=27e0f2b6733f71aceec05289b5b119cfd64d3ac1;hpb=2e070563d21bd65d70f28d3e1818cce18e6f5472 diff --git a/functions/auth.php b/functions/auth.php index bebc7f8..6ce4e4a 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -13,6 +13,15 @@ require_once( '../functions/page_header.php' ); +/* If a user opens a new session then comes back to this one, + * $base_uri isn't set because it the session is invalid. + */ + +if (! isset($base_uri)) { + ereg ('(^.*/)[^/]+/[^/]+$', $PHP_SELF, $regs); + $base_uri = $regs[1]; +} + function is_logged_in () { global $squirrelmail_language, $frame_top, $base_uri;