Created
May 27, 2014 07:33
-
-
Save jk2K/c0c1d1fa1fdd5d725437 to your computer and use it in GitHub Desktop.
批量重新计算discuz用户积分
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require './source/class/class_core.php'; | |
$discuz = & discuz_core::instance(); | |
$discuz->init(); | |
$credit = & credit::instance(); | |
$sql = 'select uid from ' . DB::table('common_member'); | |
$users = DB::fetch_all($sql); | |
//重新计算用户积分 | |
foreach ($users as $user) | |
{ | |
$uid = $user['uid'] . '<br>'; | |
echo "process uid $uid"; | |
$credit->countcredit($uid, true); | |
} | |
echo 'done'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在discuzX3.1下测试通过