Skip to content
Browse files

Fixed typo that was affecting the reordering of custom profile fields.

MDL-13909.
  • Loading branch information...
1 parent 1f1df4b commit 948cff69a666b9f5be6aa244df2e36ad20c21017 ikawhero committed Mar 20, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 user/profile/definelib.php
View
6 user/profile/definelib.php
@@ -175,12 +175,12 @@ function define_save_preprocess($data) {
*/
function profile_reorder_fields() {
if ($categories = get_records_select('user_info_category')) {
- $i = 1;
foreach ($categories as $category) {
+ $i = 1;
if ($fields = get_records_select('user_info_field', 'categoryid='.$category->id, 'sortorder ASC')) {
foreach ($fields as $field) {
$f = new object();
- $f->if = $field->id;
+ $f->id = $field->id;
$f->sortorder = $i++;
update_record('user_info_field', $f);
}
@@ -470,4 +470,4 @@ function profile_edit_field($id, $datatype, $redirect, $adminroot) {
}
}
-?>
+?>

0 comments on commit 948cff6

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