Changeset 1431

Show
Ignore:
Timestamp:
12/06/2007 12:17:41 PM (13 months ago)
Author:
Shadowhand
Message:

Fixing a bug in the Auth user model.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/auth/models/user.php

    r1364 r1431  
    44 
    55        // Relationships 
    6         protected $has_many = array('posts'); 
    76        protected $has_and_belongs_to_many = array('roles'); 
    87 
     
    9796        protected function where_key($id = NULL) 
    9897        { 
    99                 if (is_string($id) AND $id != '') 
     98                if (is_string($id) AND ! is_numeric($id)) 
    10099                { 
    101100                        return valid::email($id) ? 'email' : 'username';