Skip to content

Commit

Permalink
Fixed typo that was affecting the reordering of custom profile fields.
Browse files Browse the repository at this point in the history
MDL-13909.
  • Loading branch information
ikawhero committed Mar 20, 2008
1 parent c7a7112 commit 258db59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions user/profile/definelib.php
Expand Up @@ -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);
}
Expand Down

0 comments on commit 258db59

Please sign in to comment.