I didn't expect this problem to happen to Discuz! The X3 has not been solved yet. I don't know if the official team hasn't noticed this problem or has encountered a bottleneck. The following is the online tutorial I found. However, most of the tutorials are either hidden or need to be registered and replied, forward it here for your convenience. Modify the File: source/include/spacecp/spacecp_usergroup.php
I didn't expect this problem to happen to Discuz! The X3 has not been solved yet. I don't know if the official team hasn't noticed this problem or has encountered a bottleneck. The following is the online tutorial I found. However, most of the tutorials are either hidden or need to be registered and replied, forward it here for your convenience.
Modify the File: source/include/spacecp/spacecp_usergroup.php
Find the code:
$ Groupexpirynew = $ groupterms ['text'] [$ groupid];
Replace:
$ Groupexpirynew = $ groupterms ['text'] [$ extgroupidsnew];
Find the code:
$ Expirylist [$ group ['groupid'] ['grouptitle'] = in_array ($ group ['groupid'], $ expgrouparray )? '': $ Group ['grouptitle'];
}
}
Because the code of different versions has changed, if you cannot find all of them, you can only search for them:
$ Expirylist [$ group ['groupid'] ['grouptitle']
Add the following code (note: it must be after two braces:
If ($ expgrouparray ){
$ Extgroupidarray = array ();
Foreach (explode ("\ t", $ _ G ['forum _ extgroupids ']) as $ extgroupid ){
If ($ extgroupid = intval ($ extgroupid ))&&! In_array ($ extgroupid, $ expgrouparray )){
$ Extgroupidarray [] = $ extgroupid;
}
}
$ Groupidnew = $ _ G ['groupid'];
$ Adminidnew = $ _ G ['adminid'];
Foreach ($ expgrouparray as $ expgroupid ){
If ($ expgroupid === _ G ['groupid']) {
If (! Empty ($ groupterms ['main'] ['groupid']) {
$ Groupidnew = $ groupterms ['main'] ['groupid'];
$ Adminidnew = $ groupterms ['main'] ['adminid'];
} Else {
$ Groupidnew = DB: result_first ("SELECT groupid FROM ". DB: table ('Common _ usergroup '). "WHERE type = 'member' AND '". $ _ G ['member'] ['credit']. "'> = creditshigher AND' $ credits' If (in_array ($ _ G ['adminid'], array (1, 2, 3 ))){
$ Query = DB: query ("SELECT groupid FROM ". DB: table ('Common _ usergroup '). "WHERE groupid IN (". dimplode ($ extgroupidarray ). ") AND radminid = '$ _ G [adminid] 'limit 1 ");
$ Adminidnew = (DB: num_rows ($ query ))? $ _ G ['adminid']: 0;
} Else {
$ Adminidnew = 0;
}
}
Unset ($ groupterms ['main']);
}
Unset ($ groupterms ['text'] [$ expgroupid]);
}
Require_once libfile ('function/forum ');
$ Groupexpirynew = groupexpiry ($ groupterms );
$ Extgroupidsnew = implode ("\ t", $ extgroupidarray );
$ Grouptermsnew = addslashes (serialize ($ groupterms ));
DB: query ("UPDATE ". DB: table ('Common _ member '). "SET adminid = '$ adminidnew', groupid =' $ groupidnew', extgroupids = '$ extgroupidsnew ', groupexpiry = '$ groupexpirynew' WHERE uid = '$ _ G [uid]' ");
DB: query ("UPDATE ". DB: table ('Common _ member_field_forum '). "SET groupterms = '$ grouptermsnew' WHERE uid = '$ _ G [uid]'");
}
Normally, it takes effect directly, but if it cannot be seen, it will be OK to update the cache in the background.
This solution comes from the internet. it is feasible to perform a test. if you have more complicated problems, I am not able to reply in detail. I hope you can understand it.