if ($FH->getValue("primary") != $primaryGroup) { /* Update the primary group */ $ret = callPluginFunction("changeUserPrimaryGroup", array($uid, $FH->getValue("primary"), $primaryGroup)); foreach ($ret as $plugin => $err) { if ($err != 0 && $err != NULL) { $result .= sprintf(_("Failed to change primary group in %s plugin"), $plugin) . "<br />"; } } } } /* Secondary groups management */ if ($FH->isUpdated("secondary")) { $old = getUserSecondaryGroups($uid); $new = $FH->getValue('secondary'); foreach (array_diff($old, $new) as $group) { del_member($group, $uid); callPluginFunction("delUserFromGroup", array($uid, $group)); } foreach (array_diff($new, $old) as $group) { add_member($group, $uid); callPluginFunction("addUserToGroup", array($uid, $group)); } } /* Password change management */ if ($mode == 'edit' && $FH->getValue('pass')) { $ret = callPluginFunction("changeUserPasswd", array(array($uid, prepare_string($FH->getValue('pass'))))); if (isXMLRPCError()) { $error .= _("Password not updated") . "<br />"; } else { $result .= _("Password updated") . "<br />"; }
mysql_query("update {$member_table} set level='{$movelevel}' where no='{$cart[$i]}'", $connect); } movepage("{$PHP_SELF}?exec=view_member&group_no={$group_no}&page={$page}&keyword={$keyword}&level_search={$level_search}&page_num={$page_num}&keykind={$keykind}&like={$like}"); } // 회원 그룹 변경하는 부분 if ($exec2 == "move_group" && $member[is_admin] == 1) { for ($i = 0; $i < sizeof($cart); $i++) { mysql_query("update {$member_table} set group_no='{$movegroup}' where no='{$cart[$i]}'", $connect); mysql_query("update {$group_table} set member_num=member_num-1 where no='{$group_no}'"); mysql_query("update {$group_table} set member_num=member_num+1 where no='{$movegroup}'"); } movepage("{$PHP_SELF}?exec=view_member&group_no={$group_no}&page={$page}&keyword={$keyword}&level_search={$level_search}&page_num={$page_num}&keykind={$keykind}&like={$like}"); } // 회원삭제하는 부분 if ($exec2 == "del") { del_member($no); movepage("{$PHP_SELF}?exec=view_member&group_no={$group_no}&page={$page}&keyword={$keyword}&level_search={$level_search}&page_num={$page_num}&keykind={$keykind}&like={$like}"); } // 회원정보 변경하는 부분 if ($exec2 == "modify_member_ok") { if (isblank($name)) { Error("Please input name"); } if ($password && $password1 && $password != $password1) { Error("The password was not correct"); } $birth = mktime(0, 0, 0, $birth_2, $birth_3, $birth_1); if ($member[no] == $member_no) { $is_admin = $member[is_admin]; $level = $member[level]; }
} } } sort($members); reset($members); } else { if (isset($_POST["bconfirm"])) { $curmem = get_members($group); $newmem = array_diff($members, $curmem); $delmem = array_diff($curmem, $members); foreach ($newmem as $new) { add_member($group, $new); callPluginFunction("addUserToGroup", array($new, $group)); } foreach ($delmem as $del) { del_member($group, $del); callPluginFunction("delUserFromGroup", array($del, $group)); } if (!isXMLRPCError()) { new NotifyWidgetSuccess(_("Group successfully modified")); } $members = get_members($group); } else { $members = get_members($group); # get an array with all user's attributes $users = get_users(true); } } } $diff = array(); foreach ($users as $user) {