plugins/SpecialUserFuncs.php
changeset 1117 4d8ffe107a0d
parent 1109 c424a15a1656
child 1119 2e045975fc65
equal deleted inserted replaced
1116:220428d80925 1117:4d8ffe107a0d
   142   if ( $level > USER_LEVEL_MEMBER && !$session->user_logged_in )
   142   if ( $level > USER_LEVEL_MEMBER && !$session->user_logged_in )
   143   {
   143   {
   144     $level = USER_LEVEL_MEMBER;
   144     $level = USER_LEVEL_MEMBER;
   145   }
   145   }
   146   if ( $level <= USER_LEVEL_MEMBER && $session->user_logged_in )
   146   if ( $level <= USER_LEVEL_MEMBER && $session->user_logged_in )
       
   147   {
       
   148     if ( $target = $paths->getAllParams() )
       
   149     {
       
   150       redirect(makeUrl($target), '', '', 0);
       
   151     }
   147     $paths->main_page();
   152     $paths->main_page();
       
   153   }
       
   154   
   148   $template->header();
   155   $template->header();
   149   echo '<form action="'.makeUrl($paths->nslist['Special'].'Login').'" method="post" name="loginform" onsubmit="try{runEncryption();}catch(e){};">';
   156   echo '<form action="'.makeUrl($paths->nslist['Special'].'Login').'" method="post" name="loginform" onsubmit="try{runEncryption();}catch(e){};">';
   150   $header = ( $level > USER_LEVEL_MEMBER ) ? $lang->get('user_login_message_short_elev') : $lang->get('user_login_message_short');
   157   $header = ( $level > USER_LEVEL_MEMBER ) ? $lang->get('user_login_message_short_elev') : $lang->get('user_login_message_short');
   151   if ( isset($_POST['login']) )
   158   if ( isset($_POST['login']) )
   152   {
   159   {