XOOPS Cube Legacy base repository
修訂 | 2a676a43f5a641f50894c6e8f10d4b871eb10437 (tree) |
---|---|
時間 | 2011-11-05 23:19:28 |
作者 | bindi <bindi@704c...> |
Commiter | bindi |
- Feature Request: Legacy #3433865 - Notification Method.
git-svn-id: https://xoopscube.svn.sourceforge.net/svnroot/xoopscube/Package_Legacy/trunk@1039 704cf05f-ae62-4b0e-a484-234ee0250e75
@@ -579,6 +579,11 @@ class XoopsUserHandler extends XoopsObjectHandler | ||
579 | 579 | // RMV-NOTIFY |
580 | 580 | // Added two fields, notify_method, notify_mode |
581 | 581 | if ($user->isNew()) { |
582 | + $config = xoops_gethandler('config'); | |
583 | + $options = $config->getConfigs(new Criteria('conf_name', 'notify_method')); | |
584 | + if (isset($options) and (count($options) == 1)) { | |
585 | + $notify_method = $options[0]->getvar('conf_value'); | |
586 | + } | |
582 | 587 | $uid = $this->db->genId('users_uid_seq'); |
583 | 588 | $sql = sprintf("INSERT INTO %s (uid, uname, name, email, url, user_avatar, user_regdate, user_icq, user_from, user_sig, user_viewemail, actkey, user_aim, user_yim, user_msnm, pass, posts, attachsig, rank, level, theme, timezone_offset, last_login, umode, uorder, notify_method, notify_mode, user_occ, bio, user_intrest, user_mailok) VALUES (%u, %s, %s, %s, %s, %s, %u, %s, %s, %s, %u, %s, %s, %s, %s, %s, %u, %u, %u, %u, %s, %.2f, %u, %s, %u, %u, %u, %s, %s, %s, %u)", $this->db->prefix('users'), $uid, $this->db->quoteString($uname), $this->db->quoteString($name), $this->db->quoteString($email), $this->db->quoteString($url), $this->db->quoteString($user_avatar), time(), $this->db->quoteString($user_icq), $this->db->quoteString($user_from), $this->db->quoteString($user_sig), $user_viewemail, $this->db->quoteString($actkey), $this->db->quoteString($user_aim), $this->db->quoteString($user_yim), $this->db->quoteString($user_msnm), $this->db->quoteString($pass), $posts, $attachsig, $rank, $level, $this->db->quoteString($theme), $timezone_offset, 0, $this->db->quoteString($umode), $uorder, $notify_method, $notify_mode, $this->db->quoteString($user_occ), $this->db->quoteString($bio), $this->db->quoteString($user_intrest), $user_mailok); |
584 | 589 | } else { |
@@ -128,6 +128,15 @@ $modversion['config'][]=array ( | ||
128 | 128 | ); |
129 | 129 | |
130 | 130 | $modversion['config'][]=array ( |
131 | + "name"=>"notify_method", | |
132 | + "title"=>"XOOPS_NOTIFICATION_METHOD_DISABLE", | |
133 | + "formtype"=>"select", | |
134 | + "options"=>array("_NOT_METHOD_DISABLE"=>0,"_NOT_METHOD_PM"=>1,"_NOT_METHOD_EMAIL"=>2), | |
135 | + "valuetype"=>"int", | |
136 | + "default"=>2 | |
137 | + ); | |
138 | + | |
139 | +$modversion['config'][]=array ( | |
131 | 140 | "name"=>"new_user_notify", |
132 | 141 | "title"=>"_MI_USER_CONF_NEW_USER_NOTIFY", |
133 | 142 | "formtype"=>"yesno", |