修复用户资料相关bug

This commit is contained in:
zyx0814 2018-06-05 12:03:05 +08:00
parent 03a1f592d5
commit 137d3cc3a3

View File

@ -65,10 +65,10 @@ if (submitcheck('profilesubmit')) {
if ($field && !$field['available']) {
continue;
} elseif ($key == 'timeoffset') {
if ($value >= -12 && $value <= 12 || $value == 9999) {
C::t('user')->update($_G['uid'], array('language' => trim($value)));
if ($value >= -12 && $value <= 12 || $value == 9999) {
C::t('user')->update($_G['uid'], array('timeoffset' => intval($value)));
}
} elseif ($key == 'language') {
} elseif ($key == 'language') {
$langList = $_G['config']['output']['language_list'];
if (isset($langList[$value])) {
C::t('user')->update($_G['uid'], array('language' => ($value)));