Skip to content

Instantly share code, notes, and snippets.

@jk2K
Created May 27, 2014 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jk2K/c0c1d1fa1fdd5d725437 to your computer and use it in GitHub Desktop.
Save jk2K/c0c1d1fa1fdd5d725437 to your computer and use it in GitHub Desktop.
批量重新计算discuz用户积分
<?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';
@jk2K
Copy link
Author

jk2K commented May 27, 2014

在discuzX3.1下测试通过

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment