當前位置: 首頁>>代碼示例>>PHP>>正文


PHP uc_user_delete函數代碼示例

本文整理匯總了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);
 }
開發者ID:jechiy,項目名稱:PHPWind,代碼行數:18,代碼來源:ucuser.class.php

示例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);
 }
開發者ID:adi00,項目名稱:wumaproject,代碼行數:18,代碼來源:ucuser.class.php

示例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');
		}
	}
開發者ID:heqishengcai,項目名稱:phpcms,代碼行數:48,代碼來源:index.php

示例4: uc_user_delete

 public function uc_user_delete($uid)
 {
     $uid = explode(',', $uid);
     $ret = uc_user_delete($uid);
     return $ret;
 }
開發者ID:h3len,項目名稱:Project,代碼行數:6,代碼來源:user.class.php

示例5: userDelete

 /**
  * 會員刪除
  * @author Vimhui Develop Team
  * @param
  * @return bool
  */
 public function userDelete($uids)
 {
     return uc_user_delete($uids);
 }
開發者ID:noikiy,項目名稱:shopnc-minion,代碼行數:10,代碼來源:ucenter.model.php

示例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' : '') . "&current={$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 = '';
 }
開發者ID:MCHacker,項目名稱:discuz-docker,代碼行數:31,代碼來源:admincp_members.php

示例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) {
開發者ID:softhui,項目名稱:discuz,代碼行數:31,代碼來源:moderate_member.php

示例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++;
開發者ID:v998,項目名稱:discuzx-en,代碼行數:31,代碼來源:moderate_member.php

示例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;
}
開發者ID:thu0ng91,項目名稱:jmc,代碼行數:24,代碼來源:funuser_ucenter.php

示例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;
 }
開發者ID:ailingsen,項目名稱:pigcms,代碼行數:51,代碼來源:userObj.class.php

示例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);
         //支持批量刪除
     }
 }
開發者ID:h3len,項目名稱:Project,代碼行數:28,代碼來源:member.class.php

示例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();
開發者ID:hensonvip,項目名稱:ymroad,代碼行數:31,代碼來源:member_do.php

示例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;
 }
開發者ID:BGCX262,項目名稱:ztoa-svn-to-git,代碼行數:28,代碼來源:PassportService.class.php

示例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');
 }
開發者ID:qiuai,項目名稱:esp_cms,代碼行數:31,代碼來源:membermain.php

示例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();
開發者ID:klr2003,項目名稱:sourceread,代碼行數:31,代碼來源:member_do.php


注:本文中的uc_user_delete函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。