Пример #1
0
 function sync_user()
 {
     $rb_mod_list = !($this->users_opt & 524288) && ($is_mod = q_singleval("SELECT id FROM phpgw_fud_mod WHERE user_id={$this->id}")) && q_singleval("SELECT alias FROM phpgw_fud_users WHERE id={$this->id}") == $this->alias;
     q("UPDATE phpgw_fud_users SET " . $passwd . "\n\t\t\ticq=" . in($this->icq) . ",\n\t\t\taim=" . ssn(urlencode($this->aim)) . ",\n\t\t\tyahoo=" . ssn(urlencode($this->yahoo)) . ",\n\t\t\tmsnm=" . ssn(urlencode($this->msnm)) . ",\n\t\t\tjabber=" . ssn(htmlspecialchars($this->jabber)) . ",\n\t\t\taffero=" . ssn(urlencode($this->affero)) . ",\n\t\t\tposts_ppg='" . iz($this->posts_ppg) . "',\n\t\t\ttime_zone='" . addslashes($this->time_zone) . "',\n\t\t\tbday=" . iz($this->bday) . ",\n\t\t\tuser_image=" . ssn(htmlspecialchars($this->user_image)) . ",\n\t\t\tlocation=" . ssn(htmlspecialchars($this->location)) . ",\n\t\t\toccupation=" . ssn(htmlspecialchars($this->occupation)) . ",\n\t\t\tinterests=" . ssn(htmlspecialchars($this->interests)) . ",\n\t\t\tavatar=" . iz($this->avatar) . ",\n\t\t\ttheme=" . iz($this->theme) . ",\n\t\t\tavatar_loc=" . ssn($this->avatar_loc) . ",\n\t\t\tsig=" . ssn($this->sig) . ",\n\t\t\thome_page=" . ssn(htmlspecialchars($this->home_page)) . ",\n\t\t\tbio=" . ssn($this->bio) . ",\n\t\t\tusers_opt=" . $this->users_opt . "\n\t\tWHERE id=" . $this->id);
     if ($rb_mod_list) {
         rebuildmodlist();
     }
 }
Пример #2
0
     if ($GLOBALS['FUD_OPT_' . $i] != $GLOBALS['NEW_FUD_OPT_' . $i]) {
         $ch_list['FUD_OPT_' . $i] = $GLOBALS['NEW_FUD_OPT_' . $i];
     }
 }
 if (isset($ch_list)) {
     change_global_settings($ch_list);
     /* some fields require us to make special changes */
     if (isset($ch_list['SHOW_N_MODS'])) {
         $GLOBALS['SHOW_N_MODS'] = $ch_list['SHOW_N_MODS'];
         fud_use('users_reg.inc');
         rebuildmodlist();
     }
     /* Handle disabling of aliases */
     if (($FUD_OPT_2 ^ $NEW_FUD_OPT_2) & 128 && !($NEW_FUD_OPT_2 & 128)) {
         q('UPDATE ' . $DBHOST_TBL_PREFIX . 'users SET alias=login');
         rebuildmodlist();
     }
     /* Topic/Message tree view disabling code */
     $o = 0;
     if (($FUD_OPT_2 ^ $NEW_FUD_OPT_2) & 512 && !($NEW_FUD_OPT_2 & 512)) {
         $o |= 128;
     }
     if (($FUD_OPT_3 ^ $NEW_FUD_OPT_3) & 2 && !($NEW_FUD_OPT_3 & 2)) {
         $o |= 256;
     }
     if ($o) {
         q('UPDATE ' . $DBHOST_TBL_PREFIX . 'users SET users_opt=users_opt|' . $o . ' WHERE (users_opt & ' . $o . ')=0');
     }
     $q_data = array();
     if (isset($ch_list['POSTS_PER_PAGE'])) {
         $q_data[] = 'posts_ppg=' . (int) $ch_list['POSTS_PER_PAGE'];