• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP UserUtils类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中UserUtils的典型用法代码示例。如果您正苦于以下问题:PHP UserUtils类的具体用法?PHP UserUtils怎么用?PHP UserUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了UserUtils类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: _register

 private function _register($res, $username, $password, $email, $mobile, $code, $isValidation)
 {
     if ($isValidation) {
         // 是否开启注册手机验证
         $isRegisterValidation = WebUtils::getDzPluginAppbymeAppConfig('mobcent_register_validation');
         if ($isRegisterValidation) {
             $checkInfo = UserUtils::checkMobileCode($res, $mobile, $code);
             if ($checkInfo['rs'] == 0) {
                 return $this->makeErrorInfo($res, $checkInfo['errcode']);
             }
         }
     }
     $regInfo = UserUtils::register($username, $password, $email);
     if ($regInfo['errcode']) {
         return $this->makeErrorInfo($res, $regInfo['message']);
     }
     if ($isValidation) {
         if ($isRegisterValidation) {
             // 注册完毕之后更新手机验证信息
             $updataArr = array('uid' => $regInfo['info']['uid']);
             AppbymeSendsms::updateMobile($mobile, $updataArr);
         }
     }
     $userInfo = AppbymeUserAccess::registerProcess($regInfo['info']['uid'], $password);
     $res['token'] = (string) $userInfo['token'];
     $res['secret'] = (string) $userInfo['secret'];
     $res['uid'] = (int) $regInfo['info']['uid'];
     return $res;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:29,代码来源:RegisterAction.php


示例2: _getUserInfos

 private function _getUserInfos($uid, $longitude, $latitude, $radius, $page, $pageSize)
 {
     $userInfos = array('count' => 0, 'list' => array());
     $count = SurroundingInfo::getUserCountByUid($uid, $longitude, $latitude, $radius);
     $surroundUsers = SurroundingInfo::getAllUsersByUid($uid, $longitude, $latitude, $radius, $page, $pageSize);
     $list = array();
     foreach ($surroundUsers as $user) {
         $userInfo = array();
         $tmpUid = (int) $user['object_id'];
         $userInfo['uid'] = $tmpUid;
         $userInfo['distance'] = $user['distance'];
         $userInfo['location'] = $user['location'];
         $userInfo['nickname'] = UserUtils::getUserName($tmpUid);
         $userInfo['gender'] = UserUtils::getUserGender($tmpUid);
         $userInfo['status'] = UserUtils::getUserLoginStatus($tmpUid) == UserUtils::STATUS_ONLINE ? 1 : 0;
         $userInfo['icon'] = UserUtils::getUserAvatar($tmpUid);
         // $userInfo['is_friend'] = UserUtils::isFriend($uid, $tmpUid) ? 1 : 0;
         $userInfo['is_friend'] = UserUtils::isFollow($uid, $tmpUid) ? 1 : 0;
         $userInfo['is_black'] = UserUtils::isBlacklist($uid, $tmpUid) ? 1 : 0;
         $list[] = $userInfo;
     }
     $userInfos['count'] = $count;
     $userInfos['list'] = $list;
     return $userInfos;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:25,代码来源:SurroundingAction.php


示例3: _getAnnouncementInfo

 private function _getAnnouncementInfo($res, $id)
 {
     global $_G;
     require_once libfile('function/discuzcode');
     $announce = DzForumAnnouncement::getAnnouncementByUid($id);
     if (!count($announce)) {
         $res = $this->makeErrorInfo($res, 'announcement_nonexistence');
     } else {
         $tempAnnounce = array();
         $tempAnnounce['author'] = $announce['author'];
         $tmp = explode('.', dgmdate($announce['starttime'], 'Y.m'));
         $months[$tmp[0] . $tmp[1]] = $tmp;
         if (!empty($_GET['m']) && $_GET['m'] != dgmdate($announce['starttime'], 'Ym')) {
             continue;
         }
         $tempAnnounce['starttime'] = dgmdate($announce['starttime'], 'd');
         $tempAnnounce['endtime'] = $announce['endtime'] ? dgmdate($announce['endtime'], 'd') : '';
         $tempAnnounce['title'] = WebUtils::emptyHtml($announce['subject']);
         $uid = DzCommonMember::getUidByUsername($announce['author']);
         $tempAnnounce['icon'] = UserUtils::getUserAvatar($uid);
         $announceMessage = $announce['type'] == 1 ? "{$announce[message]}" : $announceMessage;
         $announceMessage = nl2br(discuzcode($announce['message'], 0, 0, 1, 1, 1, 1, 1));
         $announceType = array();
         $announceType['infor'] = WebUtils::emptyHtml($announceMessage);
         $announce['type'] == 1 ? $announceType['type'] = 'url' : ($announceType['type'] = 'text');
         $tempAnnounce['content'] = $announceType;
         $res['body']['list'] = $tempAnnounce;
     }
     return $res;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:30,代码来源:AnnouncementAction.php


示例4: _getImageInfoByTids

 private function _getImageInfoByTids($page, $pageSize)
 {
     $imageList = $this->_getImageTidsByFids($page, $pageSize);
     $list = array();
     global $_G;
     $forum = $_G['forum'];
     foreach ($imageList as $image) {
         $tmpImageInfo = ForumUtils::getTopicInfo($image);
         $imageSummary = ForumUtils::getTopicCover((int) $image);
         $imageInfo['board_id'] = (int) $tmpImageInfo['fid'];
         $imageInfo['board_name'] = $fid != 0 ? $forum['name'] : ForumUtils::getForumName($tmpImageInfo['fid']);
         $imageInfo['board_name'] = WebUtils::emptyHtml($imageInfo['board_name']);
         $imageInfo['topic_id'] = (int) $image;
         $imageInfo['title'] = WebUtils::emptyHtml($tmpImageInfo['subject']);
         $imageInfo['user_id'] = (int) $tmpImageInfo['authorid'];
         $imageInfo['last_reply_date'] = $tmpImageInfo['lastpost'] . "000";
         $imageInfo['user_nick_name'] = $tmpImageInfo['author'];
         $imageInfo['hits'] = (int) $tmpImageInfo['views'];
         $imageInfo['replies'] = (int) $tmpImageInfo['replies'];
         $imageInfo['top'] = (int) ForumUtils::isTopTopic($image) ? 1 : 0;
         $imageInfo['status'] = (int) $tmpImageInfo['status'];
         $imageInfo['essence'] = (int) $tmpImageInfo['digest'] ? 1 : 0;
         $imageInfo['hot'] = (int) $tmpImageInfo['highlight'] ? 1 : 0;
         $tempImageInfo = ImageUtils::getThumbImageEx($imageSummary, 15, true, false);
         $imageInfo['pic_path'] = $tempImageInfo['image'];
         $imageInfo['ratio'] = $tempImageInfo['ratio'];
         $imageInfo['userAvatar'] = UserUtils::getUserAvatar($tmpImageInfo['authorid']);
         $imageInfo['recommendAdd'] = (int) ForumUtils::getRecommendAdd($image);
         $imageInfo['isHasRecommendAdd'] = (int) ForumUtils::isHasRecommendAdd($image);
         $imageInfo['imageList'] = array();
         $imageInfo['sourceWebUrl'] = (string) ForumUtils::getSourceWebUrl($image, 'topic');
         $list[] = $imageInfo;
     }
     return $list;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:35,代码来源:PhotoGalleryAction.php


示例5: beforeControllerAction

 public function beforeControllerAction($controller, $action)
 {
     if (!($controller->id == 'index' && $action->id == 'login') && !UserUtils::isInAppbymeAdminGroup()) {
         $controller->redirect(Yii::app()->createAbsoluteUrl('admin/index/login'));
     }
     return true;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:7,代码来源:AdminModule.php


示例6: _getImageInfoList

 private function _getImageInfoList($res, $landUid, $uid, $page, $pageSize, $albumId)
 {
     $list = array();
     $imageList = UserPhotoInfo::getImageListByAlbumId($albumId, $uid, $page, $pageSize);
     foreach ($imageList as $image) {
         $tempimageInfo = PhotoUtils::getPhotoInfo($image);
         // $imageInfo['board_id'] = (Int)$albumId;
         $imageInfo['pic_id'] = (int) $image;
         $imageInfo['title'] = $tempimageInfo['title'] == "" ? $tempimageInfo['filename'] : $tempimageInfo['title'];
         $imageInfo['title'] = WebUtils::emptyHtml($imageInfo['title']);
         $imageInfo['user_id'] = (int) $uid;
         $imageInfo['release_date'] = $tempimageInfo['dateline'] . "000";
         $lastReplyDate = PhotoUtils::getReplyDate($image);
         $imageInfo['last_update_date'] = $lastReplyDate['last_reply_date'] . "000";
         $imageInfo['user_nick_name'] = $tempimageInfo['username'];
         $imageInfo['hot'] = (int) $tempimageInfo['hot'];
         $imageInfo['replies'] = (int) PhotoUtils::getReplyCount($image);
         $imageInfo['thumb_pic'] = PhotoUtils::getImageCover($image);
         $imageInfo['origin_pic'] = PhotoUtils::getPhotosoRiginCover($tempimageInfo);
         $list[] = $imageInfo;
     }
     global $_G;
     if ($_G['adminid'] != 1) {
         $albumInfo = UserPhotoInfo::getAlbumInfo($uid, $albumId);
         switch ($albumInfo['friend']) {
             case 0:
                 $list;
                 break;
             case 1:
                 UserUtils::isFriend($uid, $landUid) || $landUid == $uid ? $list : ($list = 1);
                 break;
             case 2:
                 $list = PhotoUtils::judgeDesignatedFriends($albumInfo, $landUid, $uid, $list);
                 break;
             case 3:
                 $uid == $landUid ? $list : ($list = 3);
                 break;
             case 4:
                 $landUid == $uid ? $list : ($list = 4);
                 break;
         }
     }
     $res['list'] = $list;
     if ($albumId == 0) {
         $count = UserPhotoInfo::getImageListCountByAlbumId($uid);
     } else {
         $count = UserPhotoInfo::getImageListCount($albumId, $uid);
     }
     $res = WebUtils::getWebApiArrayWithPage_oldVersion($page, $pageSize, $count, $res);
     if (empty($res['list'])) {
         if ($albumId == 0) {
             return WebUtils::makeErrorInfo_oldVersion($res, 'to_view_the_defaultAlbum_does_not_exist');
         }
         return WebUtils::makeErrorInfo_oldVersion($res, 'to_view_the_photo_does_not_exist');
     } elseif ($res['list'] == 1 || $res['list'] == 2 || $res['list'] == 3 || $res['list'] == 4) {
         $res['list'] = array();
         return WebUtils::makeErrorInfo_oldVersion($res, 'to_view_the_photo_set_privacy', array('{username}' => $albumInfo['username']));
     }
     return $res;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:60,代码来源:PhotoListAction.php


示例7: _checkMobileCode

 private function _checkMobileCode($res, $mobile, $code)
 {
     $checkInfo = UserUtils::checkMobileCode($res, $mobile, $code);
     if ($checkInfo['rs'] == 0) {
         return $this->makeErrorInfo($res, $checkInfo['errcode']);
     }
     return $res;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:8,代码来源:CheckMobileCodeAction.php


示例8: checkUserAccess

 protected function checkUserAccess($checkLogin = true)
 {
     if (!UserUtils::checkAccess() && $checkLogin) {
         WebUtils::endAppWithErrorInfo(array('rs' => 0, 'errcode' => 50000000), 'to_login');
         // WebUtils::endAppWithErrorInfo(array(), 'to_login');
     }
     global $_G;
     $this->uid = $_G['uid'];
 }
开发者ID:caidongyun,项目名称:CS,代码行数:9,代码来源:MobcentController.php


示例9: _getUserInfo

 private function _getUserInfo($uid)
 {
     $userInfo = array('uid' => 0, 'name' => '', 'avatar' => '');
     $user = UserUtils::getUserInfo($uid);
     if (!empty($user)) {
         $userInfo['uid'] = (int) $uid;
         $userInfo['name'] = $user['username'];
         $userInfo['avatar'] = UserUtils::getUserAvatar($uid, 'small');
     }
     return $userInfo;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:11,代码来源:PMListAction.php


示例10: _register

 private function _register($res, $username, $password, $email)
 {
     $regInfo = UserUtils::register($username, $password, $email);
     if ($regInfo['errcode']) {
         return $this->makeErrorInfo($res, $regInfo['message']);
     }
     $userInfo = AppbymeUserAccess::registerProcess($regInfo['info']['uid'], $password);
     $res['token'] = (string) $userInfo['token'];
     $res['secret'] = (string) $userInfo['secret'];
     $res['uid'] = (int) $regInfo['info']['uid'];
     return $res;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:12,代码来源:RegisterAction.php


示例11: adduser

function adduser($course, $tmp_roles, $new_username, $mysqli)
{
    $new_password = trim($_POST['new_password']);
    $new_surname = StringUtils::my_ucwords(trim($_POST['new_surname']));
    $new_title = $_POST['new_users_title'];
    $new_email = trim($_POST['new_email']);
    $new_first_names = StringUtils::my_ucwords(trim($_POST['new_first_names']));
    $new_year = $_POST['new_year'];
    $new_gender = $_POST['new_gender'];
    $userid = UserUtils::create_user($new_username, $new_password, $new_title, $new_first_names, $new_surname, $new_email, $course, $new_gender, $new_year, $tmp_roles, '', $mysqli);
    return $userid;
}
开发者ID:vinod-co,项目名称:centa,代码行数:12,代码来源:register.php


示例12: _switchVest

 private function _switchVest($res, $username)
 {
     global $_G;
     $username = WebUtils::t(rawurldecode($username));
     $_GET['username'] = $username;
     $myrepeatsusergroups = (array) dunserialize($_G['cache']['plugin']['myrepeats']['usergroups']);
     if (!in_array($_G['groupid'], $myrepeatsusergroups)) {
         $users = C::t('#myrepeats#myrepeats')->fetch_all_by_username($_G['username']);
         if (!$users) {
             return $this->makeErrorInfo($res, lang('plugin/myrepeats', 'usergroup_disabled'));
         } else {
             $permusers = array();
             foreach ($users as $user) {
                 $permusers[] = $user['uid'];
             }
             $member = C::t('common_member')->fetch_by_username($_GET['username']);
             if (!$member || !in_array($member['uid'], $permusers)) {
                 return $this->makeErrorInfo($res, lang('plugin/myrepeats', 'usergroup_disabled'));
             }
         }
     }
     $user = C::t('#myrepeats#myrepeats')->fetch_all_by_uid_username($_G['uid'], $_GET['username']);
     $user = current($user);
     $olddiscuz_uid = $_G['uid'];
     $olddiscuz_user = $_G['username'];
     $olddiscuz_userss = $_G['member']['username'];
     if (!$user) {
         $newuid = C::t('common_member')->fetch_uid_by_username($_GET['username']);
         if (C::t('#myrepeats#myrepeats')->count_by_uid_username($newuid, $olddiscuz_userss)) {
             // 第一次登录,需要输入密码
         }
         //return $this->makeErrorInfo($res, lang('plugin/myrepeats', 'user_nonexistence'));
     } elseif ($user['locked']) {
         return $this->makeErrorInfo($res, lang('plugin/myrepeats', 'user_locked', array('user' => $_GET['username'])));
     }
     list($password, $questionid, $answer) = explode("\t", authcode($user['logindata'], 'DECODE', $_G['config']['security']['authkey']));
     $logInfo = UserUtils::login($username, $password);
     if ($logInfo['errcode']) {
         return $this->makeErrorInfo($res, $logInfo['message']);
     }
     $userInfo = AppbymeUserAccess::loginProcess($_G['uid'], $password);
     $userAvatar = UserUtils::getUserAvatar($_G['uid']);
     $res['token'] = (string) $userInfo['token'];
     $res['secret'] = (string) $userInfo['secret'];
     $res['uid'] = (int) $_G['uid'];
     $res['avatar'] = (string) $userAvatar;
     $res['userName'] = (string) $_G['username'];
     return $res;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:49,代码来源:SwitchAction.php


示例13: _getPMList

 private function _getPMList($page, $pageSize)
 {
     $pmList = array('list' => array(), 'count' => 0);
     global $_G;
     // 在DISCUZ_ROOT/source/include/space/space_pm.php基础上二次开发
     loaducenter();
     $filter = 'privatepm';
     $perpage = $pageSize;
     $count = 0;
     $list = array();
     if ($filter == 'privatepm' || $filter == 'newpm') {
         $result = uc_pm_list($_G['uid'], $page, $perpage, 'inbox', $filter, 200);
         $count = $result['count'];
         $list = $result['data'];
     }
     if ($_G['member']['newpm']) {
         if ($newpm && $_G['setting']['cloud_status']) {
             $msgService = Cloud::loadClass('Cloud_Service_Client_Message');
             $msgService->setMsgFlag($_G['uid'], $_G['timestamp']);
         }
         C::t('common_member')->update($_G['uid'], array('newpm' => 0));
         uc_pm_ignore($_G['uid']);
     }
     $tempPMList = array();
     foreach ($list as $pm) {
         // 目前只要两人对话的列表
         if ($pm['members'] > 2 || $pm['pmtype'] != 1) {
             $count--;
             continue;
         }
         $tempPm = array();
         $tempPm['plid'] = (int) $pm['plid'];
         $tempPm['pmid'] = (int) $pm['pmid'];
         $tempPm['lastUserId'] = (int) $pm['lastauthorid'];
         $tempPm['lastUserName'] = (string) $pm['lastauthor'];
         $tempPm['lastSummary'] = (string) $pm['lastsummary'];
         $tempPm['lastDateline'] = $pm['lastdateline'] . '000';
         $tempPm['toUserId'] = (int) $pm['touid'];
         $tempPm['toUserAvatar'] = UserUtils::getUserAvatar($pm['touid']);
         $tempPm['toUserName'] = (string) $pm['tousername'];
         $tempPm['toUserIsBlack'] = UserUtils::isBlacklist($_G['uid'], $pm['touid']) ? 1 : 0;
         $tempPm['isNew'] = $pm['new'] ? 1 : 0;
         $tempPMList[] = $tempPm;
     }
     $pmList['list'] = $tempPMList;
     $pmList['count'] = $count;
     return $pmList;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:48,代码来源:PMSessionListAction.php


示例14: getCommentList

 protected function getCommentList($data)
 {
     $res = array('list' => array(), 'count' => 0);
     $list = array();
     $comments = DzPortalComment::getComments($data['id'], $data['idType'], $data['page'], $data['pageSize']);
     foreach ($comments as $comment) {
         $tmpComment = array();
         $tmpComment['managePanel'] = array(array('type' => 'quote', 'action' => '', 'title' => WebUtils::t('引用')));
         $tmpComment['id'] = (int) $comment['cid'];
         $tmpComment['uid'] = (int) $comment['uid'];
         $tmpComment['username'] = $comment['username'];
         $tmpComment['avatar'] = UserUtils::getUserAvatar($comment['uid']);
         $tmpComment['time'] = date('Y-m-d H:i', $comment['dateline']);
         $tmpComment['content'] = $this->transCommentMessage($comment['message']);
         $list[] = $tmpComment;
     }
     $res['list'] = $list;
     $res['count'] = DzPortalComment::getCount($data['id'], $data['idType']);
     return $res;
 }
开发者ID:caidongyun,项目名称:CS,代码行数:20,代码来源:CommentListAction.php


示例15: __construct

 public function __construct(array $data)
 {
     $fields = UserUtils::getTableFields();
     foreach ($fields as $f => $default) {
         if (!isset($data[$f])) {
             Core::throwError("User data is incomplete. Field {$f} is missing.");
             $data[$f] = $default;
         }
     }
     // Special case: Birthday -> Parse it into chunks
     if (strpos($data['birth'], '-') === false) {
         $data['birth'] = '0000-00-00';
     }
     $bday = explode('-', $data['birth']);
     $data['birthday'] = intval($bday[2]);
     $data['birthmonth'] = intval($bday[1]);
     $data['birthyear'] = intval($bday[0]);
     $this->data = $data;
     $this->acl = null;
 }
开发者ID:BackupTheBerlios,项目名称:viscacha-svn,代码行数:20,代码来源:class.User.php


示例16: _qqInfo

 private function _qqInfo($res, $openId, $oauthToken, $platformId)
 {
     global $_G;
     $password = MOBCENT_HACKER_PASSWORD;
     require_once libfile('function/member');
     if (!empty($platformId) && $platformId == 20) {
         $qqUserInfo = $this->_getQQinfoByOpenId($openId);
         if (isset($qqUserInfo) && !empty($qqUserInfo)) {
             $userInfo = UserUtils::getUserInfo($qqUserInfo['uid']);
             setloginstatus($userInfo, $_GET['cookietime'] ? 2592000 : 0);
             C::t('common_member_status')->update($userInfo['uid'], array('lastip' => $_G['clientip'], 'lastvisit' => TIMESTAMP, 'lastactivity' => TIMESTAMP));
             $ipArray = explode('.', $_G['clientip']);
             $sid = FileUtils::getRandomFileName('', 6);
             $data = array('sid' => $sid, 'ip1' => $ipArray[0], 'ip2' => $ipArray[1], 'ip3' => $ipArray[2], 'ip4' => $ipArray[3], 'uid' => $userInfo['uid'], 'username' => $userInfo['username'], 'groupid' => $userInfo['groupid'], 'invisible' => '0', 'action' => '', 'lastactivity' => time(), 'fid' => '0', 'tid' => '0', 'lastolupdate' => '0');
             $comSess = DzCommonSession::getComSessByUid($userInfo['uid']);
             if (!empty($comSess)) {
                 DzCommonSession::delComSess($userInfo['uid']);
             }
             DzCommonSession::insertComSess($data);
             $userAccess = AppbymeUserAccess::loginProcess($userInfo['uid'], $password);
             $res['body']['register'] = 0;
             $res['body']['uid'] = (int) $userInfo['uid'];
             $res['body']['userName'] = (string) $userInfo['username'];
             $res['body']['avatar'] = (string) UserUtils::getUserAvatar($userInfo['uid']);
             $res['body']['token'] = (string) $userAccess['token'];
             $res['body']['secret'] = (string) $userAccess['secret'];
             return $res;
         } else {
             $res['body']['register'] = 1;
             $res['body']['openId'] = (string) $openId;
             $res['body']['oauthToken'] = (string) $oauthToken;
             $res['body']['platformId'] = (int) $platformId;
             return $res;
         }
     }
     // 客户端参数不正确
     return $this->makeErrorInfo($res, 'mobcent_error_params');
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:38,代码来源:QQInfoAction.php


示例17: _transTopicList

 private function _transTopicList($topicList, $type)
 {
     $list = array();
     global $_G;
     $forum = $_G['forum'];
     foreach ($topicList as $topic) {
         $tmpTopicInfo = ForumUtils::getTopicInfo((int) $topic);
         $topicSummary = ForumUtils::getTopicSummary((int) $topic);
         $topicInfo['board_id'] = (int) $tmpTopicInfo['fid'];
         $topicInfo['board_name'] = $fid != 0 ? $forum['name'] : ForumUtils::getForumName($tmpTopicInfo['fid']);
         $topicInfo['board_name'] = WebUtils::emptyHtml($topicInfo['board_name']);
         $topicInfo['topic_id'] = (int) $topic;
         $topicInfo['type_id'] = (int) $tmpTopicInfo['typeid'];
         $topicInfo['sort_id'] = (int) $tmpTopicInfo['sortid'];
         $topicInfo['title'] = WebUtils::emptyHtml($tmpTopicInfo['subject']);
         $topicSummary['msg'] = WebUtils::emptyReturnLine($topicSummary['msg'], ' ');
         $topicInfo['subject'] = $topicSummary['msg'];
         $topicInfo['user_id'] = (int) $tmpTopicInfo['authorid'];
         if ($type = 'favorite' && empty($tmpTopicInfo['author'])) {
             $dateline = UserTopicInfo::getUserfavorite($_G['uid'], $topic);
             $topicInfo['last_reply_date'] = $dateline . '000';
             $topicInfo['user_nick_name'] = UserUtils::getUserName($dateline['uid']);
         } else {
             $topicInfo['last_reply_date'] = $tmpTopicInfo['dateline'] . '000';
             $topicInfo['user_nick_name'] = (string) $tmpTopicInfo['author'];
         }
         $topicInfo['hits'] = (int) $tmpTopicInfo['views'];
         $topicInfo['replies'] = (int) $tmpTopicInfo['replies'];
         $topicInfo['top'] = (int) ForumUtils::isTopTopic($topic) ? 1 : 0;
         $topicInfo['status'] = (int) $tmpTopicInfo['status'];
         $topicInfo['essence'] = (int) $tmpTopicInfo['digest'] ? 1 : 0;
         $topicInfo['hot'] = (int) $tmpTopicInfo['highlight'] ? 1 : 0;
         $topicInfo['pic_path'] = ImageUtils::getThumbImage($topicSummary['image']);
         $list[] = $topicInfo;
     }
     return $list;
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:37,代码来源:TopicListAction.php


示例18: _saveInfo

 private function _saveInfo($res, $username, $email, $oauthToken, $openId, $gender, $platformId)
 {
     $username = WebUtils::t(rawurldecode($username));
     $email = WebUtils::t(rawurldecode($email));
     $password = MOBCENT_HACKER_PASSWORD;
     $regInfo = UserUtils::register($username, $password, $email, 'qq');
     if ($regInfo['errcode']) {
         return $this->makeErrorInfo($res, $regInfo['message']);
     }
     $uid = $regInfo['info']['uid'];
     $userInfo = UserUtils::getUserInfo($uid);
     $userAccess = AppbymeUserAccess::registerProcess($uid, $password);
     if (!empty($platformId) && $platformId == 20) {
         $qqdata = array('uid' => $uid, 'conuin' => $oauthToken, 'conuinsecret' => '', 'conopenid' => $openId, 'conisfeed' => 1, 'conispublishfeed' => 1, 'conispublisht' => 1, 'conisregister' => 1, 'conisqzoneavatar' => 1, 'conisqqshow' => 1);
         $qqbind = array('mblid' => '', 'uid' => $uid, 'uin' => $openId, 'type' => 1, 'dateline' => time());
         $this->_inserBindlog($qqbind);
         $this->_inserConnect($qqdata);
         $updateInfo = array('avatarstatus' => 1, 'conisbind' => 1);
         // 用户是否绑定QQ
         DzCommonMember::updateMember($updateInfo, array('uid' => $uid));
         $setarr['gender'] = intval($gender);
         C::t('common_member_profile')->update($uid, $setarr);
         $ipArray = explode('.', $_G['clientip']);
         $sid = FileUtils::getRandomFileName('', 6);
         $data = array('sid' => $sid, 'ip1' => $ipArray[0], 'ip2' => $ipArray[1], 'ip3' => $ipArray[2], 'ip4' => $ipArray[3], 'uid' => $userInfo['uid'], 'username' => $userInfo['username'], 'groupid' => $userInfo['groupid'], 'invisible' => '0', 'action' => '', 'lastactivity' => time(), 'fid' => '0', 'tid' => '0', 'lastolupdate' => '0');
         DzCommonSession::insertComSess($data);
         require_once libfile('cache/userstats', 'function');
         build_cache_userstats();
         $res['token'] = (string) $userAccess['token'];
         $res['secret'] = (string) $userAccess['secret'];
         $res['uid'] = (int) $regInfo['info']['uid'];
         return $res;
     }
     // 客户端参数不正确
     return $this->makeErrorInfo($res, 'mobcent_error_params');
 }
开发者ID:frogoscar,项目名称:mobcent-discuz,代码行数:36,代码来源:SaveQQInfoAction.php


示例19: _initUser

 protected function _initUser()
 {
     if ($this->init_user) {
         $discuz_uid = isset($_GET['hacker_uid']) && MOBCENT_HACKER_UID ? $_GET['hacker_uid'] : UserUtils::getUserIdByAccess();
         if ($discuz_uid) {
             $user = getuserbyuid($discuz_uid, 1);
         }
         if (!empty($user)) {
             $this->var['member'] = $user;
         } else {
             $user = array();
             $this->_initGuest();
         }
         if ($user && $user['groupexpiry'] > 0 && $user['groupexpiry'] < TIMESTAMP && getgpc('mod') != 'spacecp' && getgpc('do') != 'expiry' && CURSCRIPT != 'home') {
             dheader('location: home.php?mod=spacecp&ac=usergroup&do=expiry');
         }
         $this->cachelist[] = 'usergroup_' . $this->var['member']['groupid'];
         if ($user && $user['adminid'] > 0 && $user['groupid'] != $user['adminid']) {
             $this->cachelist[] = 'admingroup_' . $this->var['member']['adminid'];
         }
     } else {
         $this->_initGuest();
     }
     if (empty($this->var['cookie']['lastvisit'])) {
         $this->var['member']['lastvisit'] = TIMESTAMP - 3600;
         dsetcookie('lastvisit', TIMESTAMP - 3600, 86400 * 30);
     } else {
         $this->var['member']['lastvisit'] = $this->var['cookie']['lastvisit'];
     }
     setglobal('uid', getglobal('uid', 'member'));
     setglobal('username', addslashes(getglobal('username', 'member')));
     setglobal('adminid', getglobal('adminid', 'member'));
     setglobal('groupid', getglobal('groupid', 'member'));
 }
开发者ID:caidongyun,项目名称:CS,代码行数:34,代码来源:discuz_core_x20.php


示例20: check_var

require_once '../include/errors.inc';
require_once '../classes/userutils.class.php';
$userID = check_var('id', 'POST', true, false, true);
// Check that all the past user IDs actually exist.
$id_list = explode(',', $userID);
foreach ($id_list as $id) {
    if ($id != '') {
        if (!UserUtils::userid_exists($id, $mysqli)) {
            $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email'));
            $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true);
        }
    }
}
foreach ($id_list as $single_id) {
    if ($single_id != '') {
        UserUtils::delete_userID($single_id, $mysqli);
    }
}
$mysqli->close();
?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta http-equiv="content-type" content="text/html;charset=<?php 
echo $configObject->get('cfg_page_charset');
?>
" />
  
  <title>User Deleted</title>
  
开发者ID:vinod-co,项目名称:centa,代码行数:30,代码来源:do_delete_user.php



注:本文中的UserUtils类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP User_Controller类代码示例发布时间:2022-05-23
下一篇:
PHP UserUtil类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap