Skip to content
Browse files

MDL-26177 compare 255 chars when checking custom field uniqueness

  • Loading branch information...
1 parent 78f0f64 commit ffcb8379731a6dd0c11c7cd75d446b733ae6c779 @skodak skodak committed Feb 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 user/profile/lib.php
View
2 user/profile/lib.php
@@ -136,7 +136,7 @@ function edit_validate_field($usernew) {
SELECT id, userid
FROM {user_info_data}
WHERE fieldid = ?
- AND ' . $DB->sql_compare_text('data') . ' = ?',
+ AND ' . $DB->sql_compare_text('data', 255) . ' = ' . $DB->sql_compare_text('?', 255),
array($this->field->id, $value));
if ($data) {
$existing = false;

0 comments on commit ffcb837

Please sign in to comment.
Something went wrong with that request. Please try again.