Skip to content

Commit

Permalink
修复用户资料相关bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zyx0814 committed Jun 5, 2018
1 parent 03a1f59 commit 137d3cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions user/profile/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
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)));
Expand Down

0 comments on commit 137d3cc

Please sign in to comment.