Browse files

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

MDL-13909.
  • Loading branch information...
1 parent cd3a029 commit 16aa360aacb04ffa1e7f83ff5130b06d533112a6 ikawhero committed Mar 20, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 user/profile/definelib.php
View
4 user/profile/definelib.php
@@ -185,12 +185,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);
}

0 comments on commit 16aa360

Please sign in to comment.