I want to export the user's email address today, but I can't do it. The filtering function in the DISCUZ background is indeed very powerful, but it cannot export emails. Maybe China has not paid attention to email. I researched it myself and shared it with you:
1. Open source\class\table\table_common_member.php and add this function after the fetch_all_username_by_uid to query email
public function fetch_all_useremail_by_uid($uids) {
$users = array();
if(($uids = dintval($uids, true))) {
foreach($this->fetch_all($uids) as $uid => $value) {
$users[$uid] = $value['email'];
}
}
return $users;
}
2. Find source\admincp\admincp_members.php and query elseif($operation == 'export') { and make the following changes:
The code is pasted here:
$alluseremail = C::t('common_member')->fetch_all_useremail_by_uid($uids);
$profile = array_merge(array('uid'=>$uid, 'email'=>$alluseremail[$uid], 'username'=>$allusername[$uid]),$profile);
$detail = "UID,"."Email,".$lang['username'].",".$subject."\n".$detail;
This site Original article All followed" Attribution—NonCommercial—ShareAlike 4.0 (CC BY-NC-SA 4.0) ”。 Please keep the following marks for sharing and interpretation:
Original author: Jake Tao Source: "Discuz exports user email information"

Post a reply