Ticket #650: 650.diff

File 650.diff, 1.0 kB (added by bastnic, 6 months ago)
  • lib/jelix-modules/jauth/controllers/login.classic.php

    old new  
    6565    * Shows the login form 
    6666    */ 
    6767    function form() { 
     68        if (jAuth::isConnected()) { 
     69            $conf = $GLOBALS['gJCoord']->getPlugin('auth')->config; 
     70             
     71            if ($conf['after_login'] == '') 
     72                throw new jException ('jauth~autherror.no.auth_login'); 
     73            if (!($conf['enable_after_login_override'] && $url_return= $this->param('auth_url_return'))){ 
     74                $url_return =  jUrl::get($conf['after_login']); 
     75            } 
     76 
     77            $rep = $this->getResponse('redirectUrl'); 
     78            $rep->url = $url_return; 
     79            return $rep; 
     80        } 
    6881        $rep = $this->getResponse('html'); 
    6982 
    7083        $rep->title =  jLocale::get ('auth.titlePage.login'); 
Download in other formats: Original Format