Changeset 1551

Show
Ignore:
Timestamp:
02/14/08 14:28:55 (8 months ago)
Author:
misja
Message:

Misja Hoebe <misja@curverider.co.uk> Applied patch, closes #258

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • devel/lib/elgglib.php

    r1527 r1551  
    33773377        $ok = false; 
    33783378        $user = false; 
    3379         $USER = false; 
     3379        $USER = fill_legacy_user_session(null); // guest user 
    33803380        global $messages; 
    33813381        $messages[] = __gettext("You have been banned from the system!"); 
     
    34113411                return true; 
    34123412            } else { 
    3413                 global $messages; 
    3414                 $messages[] = __gettext("You have been banned from the system!"); 
    3415                 return false; 
     3413                global $CFG; 
     3414 
     3415                // Seek and destroy user data!!! 
     3416                $_SESSION = array(); 
     3417                session_destroy(); 
     3418 
     3419                // Destroy cookie! yummie yummie 
     3420                setcookie(session_name(), '', time()-84600, $CFG->cookiepath); 
     3421 
     3422                // Clear magic code 
     3423                setcookie(AUTH_COOKIE, '', time()-84600, $CFG->cookiepath); 
     3424 
     3425                // Now becomes into guest 
     3426                $USER = fill_legacy_user_session(); 
     3427 
     3428                // For human deception... :D 
     3429                $_SESSION['messages'][] = __gettext('You have been banned from the system!'); 
    34163430            } 
    34173431        } 
  • devel/lib/setup.php

    r1547 r1551  
    346346        $_COOKIE['ElggSessionTest'.$CFG->sessioncookie] = $_SESSION['SESSION']->session_test; 
    347347    } 
    348     if (! isset($_SESSION['USER']))    { 
    349         $_SESSION['USER']    = new StdClass; 
    350     } 
     348 
     349    //@rho Force to reload user data from db 
     350    $_SESSION['USER']    = new StdClass; 
    351351     
    352352    $SESSION = &$_SESSION['SESSION'];   // Makes them easier to reference