Skip to content

Commit

Permalink
MDL-26177 compare 255 chars when checking custom field uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Feb 2, 2011
1 parent 78f0f64 commit ffcb837
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion user/profile/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ffcb837

Please sign in to comment.