Changeset 1288 for devel/auth

Show
Ignore:
Timestamp:
11/12/07 23:52:49 (1 year ago)
Author:
rho
Message:

applied #146, now can modify password length limit with $CFG flag

Signed-off-by: Rolando Espinoza La Fuente <darkrho@gmail.com>

Files:

Legend:

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

    r1236 r1288  
    127127 
    128128        /** 
    129           * checks if the LDAP username is valid by elgg 
    130           * TODO - this should be a library function somewhere. 
    131           * IMPORTANT - Currently (1Jun07) this differs from the normal elgg  
    132           * username check as LDAP can have long usernames and non-alphanum 
    133           * characters. A clear policy needs to be decided on in this matter 
    134           */ 
    135  
    136         function elgg_valid_username($username){ 
    137         return preg_match("/^[A-Za-z0-9.\-]{3,20}$/",$username); 
    138         } 
    139  
    140         /** 
    141129          * creates an entry in the elgg database for the given username and  
    142130          * password and LDAP entry 
     
    144132 
    145133        function ldap_create_elgg_user($username, $password, $user_info) { 
    146                 if(! elgg_valid_username($username)) { 
     134                if(!validate_username($username)) { 
    147135            $messages[] = __gettext("Error! LDAP Username does not meet Elgg requirements"); 
    148136        } else {