Changeset 2443

Show
Ignore:
Timestamp:
09/04/08 23:40:29 (3 months ago)
Author:
dmondark
Message:

Do not display errors messages for log entries just because their level is >= warning. Also display minimum information on login failures. Fixes #558 (see ticket for details) and #559.

Location:
trunk/htdocs/system/classes
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/classes/eventlog.php

    r2272 r2443  
    9090        } 
    9191        $log->insert(); 
    92         if ( LogEntry::severity( $severity ) >= LogEntry::severity( 'warning' ) ) { 
    93             Session::error( $message, $module ); 
    94         } 
    9592        return $log; 
    9693    } 
  • trunk/htdocs/system/classes/user.php

    r2414 r2443  
    220220        elseif(!is_object($user)) { 
    221221            EventLog::log( sprintf(_t('Login attempt (via authentication plugin) for non-existent user %s'), $who), 'warning', 'authentication', 'habari' ); 
     222            Session::error('Invalid username/password'); 
    222223            self::$identity = null; 
    223224            return false; 
     
    235236            // No such user. 
    236237            EventLog::log( sprintf(_t('Login attempt for non-existent user %s'), $who), 'warning', 'authentication', 'habari' ); 
     238            Session::error('Invalid username/password'); 
    237239            self::$identity = null; 
    238240            return false; 
     
    251253            // Wrong password. 
    252254            EventLog::log( sprintf(_t('Wrong password for user %s'), $user->username), 'warning', 'authentication', 'habari' ); 
     255            Session::error('Invalid username/password'); 
    253256            self::$identity = null; 
    254257            return false; 
  • trunk/htdocs/system/classes/userthemehandler.php

    r1392 r2443  
    5353        catch(Error $e) { 
    5454            EventLog::log($e->humane_error(), 'error', 'theme', 'habari', print_r($e, 1) ); 
     55            Session::error($e->humane_error()); //Should we display any error here? 
    5556            if(DEBUG) { 
    5657                Utils::debug($e);