Changeset 1068
- Timestamp:
- 10/21/07 17:01:05 (10 months ago)
- Files:
-
- branches/punbb-1.3-dev/upload/include/functions.php (modified) (3 diffs)
- branches/punbb-1.3-dev/upload/profile.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/punbb-1.3-dev/upload/include/functions.php
r1063 r1068 768 768 // Verifies that the provided username is OK for insertion into the database 769 769 // 770 function validate_username($username )770 function validate_username($username, $exclude_id = null) 771 771 { 772 772 global $lang_common, $lang_register, $lang_prof_reg, $pun_config; … … 798 798 799 799 // Check for username dupe 800 $dupe = check_username_dupe($username );800 $dupe = check_username_dupe($username, $exclude_id); 801 801 if ($dupe !== false) 802 802 $errors[] = sprintf($lang_prof_reg['Username dupe'], htmlspecialchars($dupe)); … … 1615 1615 1616 1616 ($hook = get_hook('fn_qr_check_username_dupe')) ? eval($hook) : null; 1617 $result = $db->query_build($query , true) or error(__FILE__, __LINE__);1617 $result = $db->query_build($query) or error(__FILE__, __LINE__); 1618 1618 1619 1619 return $db->num_rows($result) ? $db->result($result) : false; branches/punbb-1.3-dev/upload/profile.php
r1062 r1068 513 513 514 514 // Validate the new username 515 $errors = validate_username($form['username'] );515 $errors = validate_username($form['username'], $id); 516 516 if (!empty($errors)) 517 517 message(current($errors));
