@@ 702-715 (lines=14) @@ | ||
699 | ||
700 | $modx->getDatabase()->delete($tbl_web_user_settings, "webuser='{$id}'"); |
|
701 | ||
702 | foreach ($settings as $n) { |
|
703 | $vl = $_POST[$n]; |
|
704 | if (is_array($vl)) { |
|
705 | $vl = implode(",", $vl); |
|
706 | } |
|
707 | if ($vl != '') { |
|
708 | $f = array(); |
|
709 | $f['webuser'] = $id; |
|
710 | $f['setting_name'] = $n; |
|
711 | $f['setting_value'] = $vl; |
|
712 | $f = $modx->getDatabase()->escape($f); |
|
713 | $modx->getDatabase()->insert($f, $tbl_web_user_settings); |
|
714 | } |
|
715 | } |
|
716 | } |
|
717 | } |
|
718 | ||
@@ 795-807 (lines=13) @@ | ||
792 | ||
793 | $modx->getDatabase()->delete($tbl_user_settings, "user='{$id}'"); |
|
794 | ||
795 | foreach ($settings as $n => $vl) { |
|
796 | if (is_array($vl)) { |
|
797 | $vl = implode(",", $vl); |
|
798 | } |
|
799 | if ($vl != '') { |
|
800 | $f = array(); |
|
801 | $f['user'] = $id; |
|
802 | $f['setting_name'] = $n; |
|
803 | $f['setting_value'] = $vl; |
|
804 | $f = $modx->getDatabase()->escape($f); |
|
805 | $modx->getDatabase()->insert($f, $tbl_user_settings); |
|
806 | } |
|
807 | } |
|
808 | } |
|
809 | } |
|
810 |