本文整理汇总了PHP中uc_user_delete函数的典型用法代码示例。如果您正苦于以下问题:PHP uc_user_delete函数的具体用法?PHP uc_user_delete怎么用?PHP uc_user_delete使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了uc_user_delete函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
function delete($u_arr)
{
if (empty($u_arr)) {
return false;
}
require_once R_P . 'require/writelog.php';
global $admin_name, $timestamp, $onlineip;
$udb = array();
$userService = $this->_getUserService();
foreach ($userService->getByUserIds($u_arr) as $rt) {
$log = array('type' => 'deluser', 'username1' => $rt['username'], 'username2' => $admin_name, 'field1' => 0, 'field2' => $rt['groupid'], 'field3' => '', 'descrip' => 'deluser_descrip', 'timestamp' => $timestamp, 'ip' => $onlineip);
writelog($log);
$udb[] = $rt['uid'];
}
$this->delUserByIds($udb);
require_once R_P . 'uc_client/uc_client.php';
uc_user_delete($u_arr);
}
示例2: delete
function delete($u_arr)
{
if (empty($u_arr)) {
return false;
}
require_once R_P . 'uc_client/uc_client.php';
uc_user_delete($u_arr);
require_once R_P . 'require/writelog.php';
global $admin_name, $timestamp, $onlineip;
$udb = array();
$query = $this->db->query("SELECT m.uid,m.username,m.groupid FROM pw_members m LEFT JOIN pw_memberdata md ON md.uid=m.uid WHERE m.uid IN(" . pwImplode($u_arr) . ")");
while ($rt = $this->db->fetch_array($query)) {
$log = array('type' => 'deluser', 'username1' => $rt['username'], 'username2' => $admin_name, 'field1' => 0, 'field2' => $rt['groupid'], 'field3' => '', 'descrip' => 'deluser_descrip', 'timestamp' => $timestamp, 'ip' => $onlineip);
writelog($log);
$udb[] = $rt['uid'];
}
$this->delUserByIds($udb);
}
示例3: delete
/**
* 删除用户
* @param string {$uid:用户id;$username:用户名;$email:email}
* @return array {-1:删除失败;>0:删除成功}
*/
public function delete() {
$this->uid = isset($this->data['uid']) ? $this->data['uid'] : '';
$this->email = isset($this->data['email']) ? $this->data['email'] : '';
if($this->uid > 0 || is_array($this->uid)) {
$where = to_sqls($this->uid, '', 'uid');
//ucenter部份
if ($this->config['ucuse']) {
pc_base::load_config('uc_config');
require_once PHPCMS_PATH.'api/uc_client/client.php';
$s = $this->db->select($where, 'ucuserid');
if ($s) {
$uc_data = array();
foreach ($s as $k=>$v) {
$uc_data[$k] = $v['ucuserid'];
}
if (!empty($uc_data)) $r = uc_user_delete($uc_data);
if (!$r) {
exit('-1');
}
} else {
exit('-1');
}
}
/*插入消息队列*/
$noticedata['uids'] = $this->uid;
messagequeue::add('member_delete', $noticedata);
$this->db->delete($where);
exit('1');
} elseif(!empty($this->username)) {
$this->db->delete(array('username'=>$this->username));
exit('2');
} elseif(!empty($this->email)) {
$this->db->delete(array('email'=>$this->email));
exit('3');
} else {
exit('-1');
}
}
示例4: uc_user_delete
public function uc_user_delete($uid)
{
$uid = explode(',', $uid);
$ret = uc_user_delete($uid);
return $ret;
}
示例5: userDelete
/**
* 会员删除
* @author Vimhui Develop Team
* @param
* @return bool
*/
public function userDelete($uids)
{
return uc_user_delete($uids);
}
示例6: foreach
foreach ($query as $comment) {
$comments[] = $comment['cid'];
}
if ($comments) {
deletecomments($comments);
} else {
$next = 0;
$nextdeleteitem = 'allitem';
}
}
if ($deleteitem == 'allitem') {
require_once libfile('function/delete');
$numdeleted = deletemember($uids);
if ($isfounder && !empty($_GET['includeuc'])) {
loaducenter();
uc_user_delete($uids);
}
if (!empty($_GET['uidarray'])) {
cpmsg('members_delete_succeed', '', 'succeed', array('numdeleted' => $numdeleted));
} else {
$allnum += $membernum < $delmemberlimit ? $membernum : $delmemberlimit;
$nextlink = "action=members&operation=clean&confirmed=yes&submit=yes&includepost=yes" . (!empty($_GET['includeuc']) ? '&includeuc=yes' : '') . "&allnum={$allnum}&deletestart=" . ($deletestart + $delmemberlimit) . $urladd;
cpmsg(cplang('members_delete_user_processing_next', array('deletestart' => $deletestart, 'nextdeletestart' => $deletestart + $delmemberlimit)), $nextlink, 'loadingform', array());
}
}
$nextlink = "action=members&operation=clean&confirmed=yes&submit=yes&includepost=yes" . (!empty($_GET['includeuc']) ? '&includeuc=yes' : '') . "¤t={$next}&pertask={$pertask}&lastprocess={$processed}&allnum={$allnum}&deletestart={$deletestart}" . $urladd;
if (empty($_GET['uidarray'])) {
$deladdmsg = cplang('members_delete_user_processing', array('deletestart' => $deletestart, 'nextdeletestart' => $deletestart + $delmemberlimit)) . '<br>';
} else {
$deladdmsg = '';
}
示例7: array_keys
if ($member['groupid'] == 8) {
$members[$uid] = $member;
}
}
$alluids = array_keys($members);
if ($_GET['apply_all']) {
$moderation[$_GET['apply_all']] = array_merge($alluids, $moderation[$_GET['apply_all']]);
}
if (!empty($members)) {
$numdeleted = $numinvalidated = $numvalidated = 0;
if (!empty($moderation['delete']) && is_array($moderation['delete'])) {
$deluids = array_intersect($moderation['delete'], $alluids);
$numdeleted = count($deluids);
C::t('common_member')->delete_no_validate($deluids);
loaducenter();
uc_user_delete($deluids);
} else {
$moderation['delete'] = array();
}
if (!empty($moderation['validate']) && is_array($moderation['validate'])) {
$validateuids = array_intersect($moderation['validate'], $alluids);
C::t('common_member')->update($validateuids, array('adminid' => 0, 'groupid' => $_G['setting']['newusergroupid']));
$numvalidated = count($validateuids);
C::t('common_member_validate')->delete($validateuids);
} else {
$moderation['validate'] = array();
}
if (!empty($moderation['invalidate']) && is_array($moderation['invalidate'])) {
$invalidateuids = array_intersect($moderation['invalidate'], $alluids);
$numinvalidated = count($invalidateuids);
foreach ($invalidateuids as $uid) {
示例8: implode
if ($_G['gp_apply_all']) {
$uids .= ',' . $member['uid'];
$moderation[$_G[gp_apply_all]][] = $member['uid'];
}
}
if (is_array($uidarray) && !empty($uidarray)) {
$uids = implode(',', $uidarray);
$numdeleted = $numinvalidated = $numvalidated = 0;
if (!empty($moderation['delete']) && is_array($moderation['delete'])) {
$deleteuids = '\'' . implode('\',\'', $moderation['delete']) . '\'';
DB::query("DELETE FROM " . DB::table('common_member') . " WHERE uid IN ({$deleteuids}) AND uid IN ({$uids})");
$numdeleted = DB::affected_rows();
DB::query("DELETE FROM " . DB::table('common_member_field_forum') . " WHERE uid IN ({$deleteuids}) AND uid IN ({$uids})");
DB::query("DELETE FROM " . DB::table('common_member_validate') . " WHERE uid IN ({$deleteuids}) AND uid IN ({$uids})");
loaducenter();
uc_user_delete($moderation['delete']);
} else {
$moderation['delete'] = array();
}
if (!empty($moderation['validate']) && is_array($moderation['validate'])) {
$newgroupid = DB::result_first("SELECT groupid FROM " . DB::table('common_usergroup') . " WHERE creditshigher<=0 AND 0<creditslower LIMIT 1");
$validateuids = '\'' . implode('\',\'', $moderation['validate']) . '\'';
DB::query("UPDATE " . DB::table('common_member') . " SET adminid='0', groupid='{$newgroupid}' WHERE uid IN ({$validateuids}) AND uid IN ({$uids})");
$numvalidated = DB::affected_rows();
DB::query("DELETE FROM " . DB::table('common_member_validate') . " WHERE uid IN ({$validateuids}) AND uid IN ({$uids})");
} else {
$moderation['validate'] = array();
}
if (!empty($moderation['invalidate']) && is_array($moderation['invalidate'])) {
foreach ($moderation['invalidate'] as $uid) {
$numinvalidated++;
示例9: jieqi_udelete_iprocess
/**
* 用户接口,删除处理
*
* @param array $params 参数数组
* 必须参数: $params['username'] - 用户名,$params['password'] - 密码,$params['email'] - 邮箱
* @access public
* @return int
*/
function jieqi_udelete_iprocess(&$params)
{
global $jieqiLang;
if (!isset($jieqiLang['system'])) {
jieqi_loadlang('users', 'system');
}
uc_user_delete($params['username']);
if (defined('JIEQI_WAP_PAGE')) {
jieqi_wapgourl($params['jumpurl']);
} elseif ($_REQUEST['jumphide']) {
header('Location: ' . $params['jumpurl']);
} else {
jieqi_jumppage($params['jumpurl'], LANG_DO_SUCCESS, $jieqiLang['system']['delete_user_success']);
}
return true;
}
示例10: signupWithUC
public function signupWithUC($username, $password, $email, $storeUserIndependent = 0, $options = array())
{
$rt = 1;
if (!$storeUserIndependent) {
if (SYNC_WITH_UC) {
$ucenterUserName = $username;
if (defined('UCENTER_CHARSET') && UCENTER_CHARSET == 'utf-8') {
$ucenterUserName = iconv('gbk', 'utf-8', $ucenterUserName);
}
include_once ABS_PATH . '/uc_client/client.php';
$rt = uc_user_register($ucenterUserName, $password, $email);
} elseif (defined('SYNC_WITH_PHPWIND') && SYNC_WITH_PHPWIND) {
define('AUTOSYSTEM', '1');
include ABS_PATH . '/pw_api.php';
include ABS_PATH . '/uc_client/uc_client.php';
$rt = uc_user_register($username, md5($password), $email);
//把错误结果转换为ucenter的错误代码
switch ($rt) {
default:
break;
case -2:
$rt = -3;
//用户名已被注册
break;
case -3:
$rt = -4;
//邮箱非法
break;
case -4:
$rt = -6;
//邮箱已经被注册
break;
}
}
}
if ($rt > 0) {
$rt = $this->signup($username, $email, $password, $storeUserIndependent, $options);
if ($rt) {
setcookie('jsusername', escape($username), SYS_TIME + 2592000, '/', DOMAIN_ROOT);
}
//
if ($rt < 1) {
//cannot insert into auto_user table,so delete the record in uc_member
if (SYNC_WITH_UC && !$storeUserIndependent) {
include ABS_PATH . '/uc_client/client.php';
uc_user_delete($username);
}
}
}
return $rt;
}
示例11: delUcUser
/**
*
* 删除uc会员 ...
* @param int $memberId
*/
public function delUcUser($memberId)
{
if (empty($memberId)) {
return 0;
}
$condition = ' AND m.member_id IN (' . $memberId . ')';
$delMemberInfo = $this->get_member_info($condition, 'm.member_name,m.type', '', 'member_id', 0);
if (empty($delMemberInfo)) {
return 0;
}
$check_Bind = new check_Bind();
include_once CUR_CONF_PATH . 'uc_client/client.php';
$ucId = array();
foreach ($delMemberInfo as $k => $v) {
if (in_array($v['type'], array('m2o', 'uc'))) {
$ucId[] = $check_Bind->check_uc($k, $v['type']);
}
}
if ($ucId) {
return uc_user_delete($ucId);
//支持批量删除
}
}
示例12: uc_get_user
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid='{$id}' LIMIT 1");
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid='{$id}' LIMIT 1");
//删除用户相关数据
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid='{$id}' ");
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='{$id}' ");
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_guestbook` WHERE mid='{$id}' ");
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid='{$id}' ");
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid='{$id}' Or fromid='{$id}' ");
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid='{$id}' Or fid='{$id}' ");
$dsql->ExecuteNoneQuery("DELETE FROM `#@__member_vhistory` WHERE mid='{$id}' Or vid='{$id}' ");
$dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid='{$id}' ");
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid='{$id}'");
#api{{
if (defined('UC_API') && @(include_once DEDEROOT . '/uc_client/client.php')) {
$infofromuc = uc_get_user($row['userid']);
uc_user_delete($infofromuc[0]);
}
#/aip}}
} else {
ShowMsg("无法删除此会员,如果这个会员是<b>[管理员]</b>,<br />必须先删除这个<b>[管理员]</b>才能删除此帐号!", $ENV_GOBACK_URL, 0, 5000);
exit;
}
}
ShowMsg("成功删除一个会员!", $ENV_GOBACK_URL);
exit;
}
$randcode = mt_rand(10000, 99999);
$safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24);
$wintitle = "会员管理-删除会员";
$wecome_info = "<a href='" . $ENV_GOBACK_URL . "'>会员管理</a>::删除会员";
$win = new OxWindow();
示例13: user_delete
/**
* 删除用户
* @param type $uid 用户名
* @return int 1:成功
* 0:失败
*/
public function user_delete($uid)
{
$modelid = M("Member")->where(array("userid" => $uid))->getField("modelid");
if (!$modelid) {
return 0;
}
$Model_Member = F("Model_Member");
$tablename = ucwords($Model_Member[$modelid]['tablename']);
if ($this->UCenter) {
if (!uc_user_delete($uid)) {
return 0;
}
}
//删除本地用户数据开始
if (M("Member")->where(array("userid" => $uid))->delete()) {
M($tablename)->where(array("userid" => $uid))->delete();
//删除connect
M("Connect")->where(array("uid" => $uid))->delete();
return 1;
}
return 0;
}
示例14: onmemberdel
function onmemberdel()
{
if ($this->CON['mem_isucenter']) {
require admin_ROOT . 'public/uc_client/client.php';
}
$db_table = db_prefix . 'member';
$db_table2 = db_prefix . 'member_value';
$selectinfoid = $this->fun->accept('memberselectinfoid', 'P');
if (empty($selectinfoid)) {
exit('false');
}
$infoarray = explode(',', $selectinfoid);
$count = count($infoarray) - 1;
if ($count <= 0) {
exit('false');
}
for ($i = 0; $i < $count; $i++) {
$db_where = "userid={$infoarray[$i]}";
if ($this->CON['mem_isucenter']) {
$username = $this->get_member(null, $infoarray[$i], 'username');
$data = uc_get_user($username);
if ($data) {
$delid = uc_user_delete($data[0]);
}
}
$this->db->query('DELETE FROM ' . $db_table . ' WHERE ' . $db_where);
$this->db->query('DELETE FROM ' . $db_table2 . ' WHERE ' . $db_where);
}
$this->writelog($this->lng['membermain_del_log'], $this->lng['log_extra_ok'] . ' id=' . $selectinfoid);
exit('true');
}
示例15: uc_user_delete
$dsql->ExecuteNoneQuery("Delete From `#@__member_space` where mid='{$id}' limit 1");
$dsql->ExecuteNoneQuery("Delete From `#@__member_company` where mid='{$id}' limit 1");
$dsql->ExecuteNoneQuery("Delete From `#@__member_person` where mid='{$id}' limit 1");
//删除用户相关数据
$dsql->ExecuteNoneQuery("Delete From `#@__member_stow` where mid='{$id}' ");
$dsql->ExecuteNoneQuery("Delete From `#@__member_flink` where mid='{$id}' ");
$dsql->ExecuteNoneQuery("Delete From `#@__member_guestbook` where mid='{$id}' ");
$dsql->ExecuteNoneQuery("Delete From `#@__member_operation` where mid='{$id}' ");
$dsql->ExecuteNoneQuery("Delete From `#@__member_pms` where toid='{$id}' Or fromid='{$id}' ");
$dsql->ExecuteNoneQuery("Delete From `#@__member_friends` where mid='{$id}' Or fid='{$id}' ");
$dsql->ExecuteNoneQuery("Delete From `#@__member_vhistory` where mid='{$id}' Or vid='{$id}' ");
$dsql->ExecuteNoneQuery("Delete From `#@__feedback` where mid='{$id}' ");
$dsql->ExecuteNoneQuery("update `#@__archives` set mid='0' where mid='{$id}'");
#api{{
if (defined('UC_API') && @(include_once DEDEROOT . '/uc_client/client.php')) {
uc_user_delete($row['userid']);
}
#/aip}}
} else {
ShowMsg("无法删除此会员,如果这个会员是<b>[管理员]</b>,<br />必须先删除这个<b>[管理员]</b>才能删除此帐号!", $ENV_GOBACK_URL, 0, 5000);
exit;
}
}
ShowMsg("成功删除一个会员!", $ENV_GOBACK_URL);
exit;
}
$randcode = mt_rand(10000, 99999);
$safecode = substr(md5($cfg_cookie_encode . $randcode), 0, 24);
$wintitle = "会员管理-删除会员";
$wecome_info = "<a href='" . $ENV_GOBACK_URL . "'>会员管理</a>::删除会员";
$win = new OxWindow();