Changeset 1288 for devel/auth
- Timestamp:
- 11/12/07 23:52:49 (1 year ago)
- Files:
-
- devel/auth/ldap/lib.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/auth/ldap/lib.php
r1236 r1288 127 127 128 128 /** 129 * checks if the LDAP username is valid by elgg130 * TODO - this should be a library function somewhere.131 * IMPORTANT - Currently (1Jun07) this differs from the normal elgg132 * username check as LDAP can have long usernames and non-alphanum133 * characters. A clear policy needs to be decided on in this matter134 */135 136 function elgg_valid_username($username){137 return preg_match("/^[A-Za-z0-9.\-]{3,20}$/",$username);138 }139 140 /**141 129 * creates an entry in the elgg database for the given username and 142 130 * password and LDAP entry … … 144 132 145 133 function ldap_create_elgg_user($username, $password, $user_info) { 146 if(! elgg_valid_username($username)) {134 if(!validate_username($username)) { 147 135 $messages[] = __gettext("Error! LDAP Username does not meet Elgg requirements"); 148 136 } else {
