Show
Ignore:
Timestamp:
04/09/06 23:29:35 (3 years ago)
Author:
mbonetti
Message:

Handle all user business in a new (early loaded) User class. Also fixes #382

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/cls/wrappers/header.php

    r1421 r1424  
    137137function rss_header_logininfo() { 
    138138 
    139         // Login handler 
    140         if (isset($_POST['username']) && isset($_POST['password'])) { 
    141             $loginRes  = explode('|', __exp_login($_POST['username'],md5($_POST['password']))); 
    142             $user = array(); 
    143             list($user['ulevel'],$user['uname'],$dummy) = $loginRes; 
    144             unset($dummy); 
    145         } else { 
    146             $user = rss_getUser(); 
    147         } 
    148  
    149139    $ret = "<span id=\"loginfo\">\n"; 
    150140     
    151     if ($user['ulevel'] > RSS_USER_LEVEL_NOLEVEL) { 
    152         $ret .= sprintf(LBL_LOGGED_IN_AS, $user['uname']) 
     141    if (rss_user_level() > RSS_USER_LEVEL_NOLEVEL) { 
     142        $ret .= sprintf(LBL_LOGGED_IN_AS, rss_user_name()) 
    153143                ."&nbsp;|&nbsp;<a href=\"".getPath()."?logout\">".LBL_LOG_OUT."</a>\n"; 
    154144    } else {