Changeset 1288 for devel/lms

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/lms/join.php

    r659 r1288  
    4545    if ($mode == 'join') { 
    4646        // validate 
    47         if (!preg_match("/^[A-Za-z0-9]{3,12}$/",$u->username)) { 
     47        if (!validate_username($u->username)) { 
    4848            $messages[] = __gettext("Error! Your username must contain letters and numbers only, cannot be blank, and must be between 3 and 12 characters in length."); 
    49         } 
    50  
    51         if (record_exists('users','username',strtolower($u->username))) { 
     49        } elseif (!username_is_available(strtolower($u->username))) { 
    5250            $messages[] = __gettext("The username '$username' is already taken by another user. You will need to pick a different one."); 
    5351        } 
    5452 
    55         if ($u->password1 != $u->password2 || strlen($u->password1) < 6 || strlen($u->password2) > 16) { 
     53        if (!validate_password($u->password1, $u->password2)) { 
    5654            $messages[] = __gettext("Error! Invalid password. Your passwords must match and be between 6 and 16 characters in length."); 
    5755        }