{"id":152,"date":"2007-04-18T17:19:14","date_gmt":"2007-04-18T09:19:14","guid":{"rendered":"http:\/\/twycf.com\/wordpress\/archives\/152"},"modified":"2007-04-18T17:19:14","modified_gmt":"2007-04-18T09:19:14","slug":"xoops-system-module-10-%e6%96%b0%e5%a2%9e%e4%bd%bf%e7%94%a8%e8%80%85%e6%99%82%ef%bc%8c%e5%a4%9a%e7%be%a4%e7%b5%84%e4%b8%8d%e8%83%bd%e5%84%b2%e5%ad%98%e7%9a%84%e5%95%8f%e9%a1%8c","status":"publish","type":"post","link":"https:\/\/twycf.com\/?p=152","title":{"rendered":"xoops system module 1.0 \u65b0\u589e\u4f7f\u7528\u8005\u6642\uff0c\u591a\u7fa4\u7d44\u4e0d\u80fd\u5132\u5b58\u7684\u554f\u984c"},"content":{"rendered":"<p>System \u6a21\u7d44\u65b0\u589e\u4f7f\u7528\u8005\u6642\uff0c\u9078\u64c7\u591a\u500b\u7fa4\u7d44\u53ea\u6703\u5132\u5b58\u7b2c\u4e00\u500b<br \/>\n\u6b64\u4fee\u6b63\u53ea\u9069\u5408 xoops 2.0.x\u7248\uff0c2.3 \u6c92\u6709\u9019\u500b\u554f\u984c\uff0c\u4fee\u6b63\u65b9\u5f0f\u5982\u4e0b\uff1a<br \/>\n\\modules\\system\\admin\\users\\main.php<!--more--><br \/>\n\u627e\u5230\u9019\u4e00\u6bb5<br \/>\nif (!$member_handler->insertUser($newuser)) {<br \/>\n    $adduser_errormsg = _AM_CNRNU;<br \/>\n} else {<br \/>\n    if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newuser->getVar(&#8216;uid&#8217;))) {<br \/>\n        $adduser_errormsg = _AM_CNRNU2;<br \/>\n    } else {<br \/>\n    if( strlen($adduser_errormsg)==0){<br \/>\n        redirect_header(&#8220;admin.php?fct=subusers&#8221;,1,_AM_DBUPDATED);<br \/>\n        exit();<\/p>\n<p>\u53d6\u4ee3\u6210<br \/>\nif (!$member_handler->insertUser($newuser)) {<br \/>\n    $adduser_errormsg = _AM_CNRNU;<br \/>\n} else {<br \/>\n  if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newuser->getVar(&#8216;uid&#8217;)))<br \/>\n    $adduser_errormsg = _AM_CNRNU2;<br \/>\n  foreach($groups as $gid){<br \/>\n    if (!$member_handler->addUserToGroup($gid, $newuser->getVar(&#8216;uid&#8217;)))<br \/>\n      $adduser_errormsg = _AM_CNRNU2;<br \/>\n  }<br \/>\n    \/\/if (!$member_handler->addUserToGroup(XOOPS_GROUP_USERS, $newuser->getVar(&#8216;uid&#8217;))) {<br \/>\n      \/\/  $adduser_errormsg = _AM_CNRNU2;<br \/>\n    \/\/} else {<br \/>\n    if( strlen($adduser_errormsg)==0){<br \/>\n        redirect_header(&#8220;admin.php?fct=subusers&#8221;,1,_AM_DBUPDATED);<br \/>\n        exit();<\/p>\n","protected":false},"excerpt":{"rendered":"<p>System \u6a21\u7d44\u65b0\u589e\u4f7f\u7528\u8005\u6642\uff0c\u9078\u64c7\u591a\u500b\u7fa4\u7d44\u53ea\u6703\u5132\u5b58\u7b2c\u4e00\u500b \u6b64\u4fee\u6b63\u53ea\u9069\u5408 xoops 2.0.x\u7248\uff0c2.3 \u6c92 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,15],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-xoops"],"_links":{"self":[{"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/twycf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=152"}],"version-history":[{"count":0,"href":"https:\/\/twycf.com\/index.php?rest_route=\/wp\/v2\/posts\/152\/revisions"}],"wp:attachment":[{"href":"https:\/\/twycf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/twycf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/twycf.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}