当前位置: 首页>>代码示例>>PHP>>正文


PHP users::getCid方法代码示例

本文整理汇总了PHP中users::getCid方法的典型用法代码示例。如果您正苦于以下问题:PHP users::getCid方法的具体用法?PHP users::getCid怎么用?PHP users::getCid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在users的用法示例。


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

示例1: getContactsInfo

/**
 * Вернуть контактные данные фрилансера если есть доступ их смотреть
 * 
 * @param type $login
 * @param type $hash
 * @return \xajaxResponse
 */
function getContactsInfo($login, $hash)
{
    $objResponse = new xajaxResponse();
    if ($hash === paramsHash(array($login))) {
        $freelancer = new freelancer();
        $freelancer->GetUser($login);
        if ($freelancer->uid > 0 && !is_emp($freelancer->role) && is_view_contacts($freelancer->uid) && is_contacts_not_empty($freelancer)) {
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/template.php';
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/country.php';
            require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/city.php';
            require_once ABS_PATH . '/classes/statistic/StatisticFactory.php';
            require_once ABS_PATH . '/classes/users.php';
            $html = Template::render($_SERVER['DOCUMENT_ROOT'] . '/user/contacts_info.php', array('user' => $freelancer));
            $ga = StatisticFactory::getInstance('GA');
            $ga->queue('event', array('uid' => isset($_SESSION['uid']) ? $_SESSION['uid'] : 0, 'cid' => users::getCid(), 'category' => 'Freelancer', 'action' => 'show_contacts', 'label' => "{'login': '{$freelancer->login}'}"));
            $objResponse->assign('contacts_info_block', 'innerHTML', $html);
        }
    }
    return $objResponse;
}
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:27,代码来源:users.server.php

示例2: afterSuccessRegistation

 /**
  * Метод вызывается после успешной регистации
  */
 protected function afterSuccessRegistation($newuser)
 {
     if (!$newuser || $newuser->uid <= 0) {
         return false;
     }
     $_SESSION['reg_role'] = is_emp($newuser->role) ? 'customer' : 'freelancer';
     //Отправить в очередь события регистрации для GA
     require_once ABS_PATH . '/classes/statistic/StatisticFactory.php';
     require_once ABS_PATH . '/classes/users.php';
     $ga = StatisticFactory::getInstance('GA');
     $ga->queue('event', array('uid' => $newuser->uid, 'cid' => users::getCid(), 'category' => $_SESSION['reg_role'], 'action' => 'registration_finished'));
     return true;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:16,代码来源:registration.php

示例3: sendStatistic

 public function sendStatistic($project_kind_ident, $offers_count, $is_pro, $offer_id)
 {
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/projects.php';
     global $DB;
     $params = array('cid' => users::getCid(), 'project_kind_ident' => $project_kind_ident, 'offer_count' => $offers_count, 'is_pro' => $is_pro, 'offer_id' => $offer_id);
     $query = http_build_query($params);
     $DB->query("SELECT pgq.insert_event('statistic', 'project_answer', ?)", $query);
 }
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:8,代码来源:projects_offers.php

示例4: array

        if ($id == users::AUTH_STATUS_2FA) {
            if (!empty($customRedirect)) {
                $_SESSION['2fa_redirect'] = array('redirectUri' => $customRedirect);
            }
            //Редирект на 2ой атап авторизации
            $back_url = '/auth/second/';
        } elseif (!$back_url) {
            $back_url = is_emp() ? '/' : '/projects/';
        }
        //Успешная авторизация
        if ($id > 0) {
            //Отправляем в очередь событие об успешной авторизации
            if ($type = $opauthModel->getShortType()) {
                require_once ABS_PATH . '/classes/statistic/StatisticFactory.php';
                $ga = StatisticFactory::getInstance('GA');
                $ga->queue('event', array('uid' => $id, 'cid' => users::getCid(), 'category' => is_emp() ? 'customer' : 'freelancer', 'action' => 'authorization_passed', 'label' => $type));
            }
        }
    } else {
        $_SESSION['opauth_error'] = 'Данный аккаунт социальной сети уже привязан к другому пользователю';
    }
    header("Location: {$back_url}");
    exit;
} else {
    if ($type == OpauthHelper::ACTION_REGISTER) {
        $registrationData = OpauthHelper::getRegistrationData($response);
        $postedRole = $emp_redirect ? registration::ROLE_EMPLOYER : __paramInit('int', null, 'role_db_id');
        $postedEmail = __paramInit('string', null, 'email');
        $postedLogin = __paramInit('string', null, 'login');
        if ($postedRole && $postedEmail && $postedLogin) {
            $registrationData['role'] = $postedRole;
开发者ID:kapai69,项目名称:fl-ru-damp,代码行数:31,代码来源:index.php

示例5: isValid

 /**
  * Проверка авторизации и установка ошибки или URL для перехода
  * 
  * @param type $data
  * @return boolean
  */
 public function isValid($data)
 {
     if ($valid = parent::isValid($data)) {
         $data = $this->getValues();
         $autologin = isset($data['autologin']) && $data['autologin'] == 1;
         $pwd = users::hashPasswd($data['passwd']);
         $uid = login($data['login'], $pwd, $autologin);
         switch ($uid) {
             case self::UID_FAIL:
                 $valid = false;
                 $this->getElement('login')->addError(self::FAIL_LOGIN_MSG);
                 break;
             case self::UID_BANNED:
                 $_SESSION['rand'] = csrf_token();
                 $this->redirect_to = sprintf(self::REDIRECT_URL_BANNED, $data['login'], $_SESSION['rand']);
                 break;
             case self::UID_INNACTIVE:
                 $this->redirect_to = self::REDIRECT_URL_INACTIVE;
                 break;
             case self::UID_DENYIP:
                 $this->redirect_to = sprintf(self::REDIRECT_URL_DENYIP, $data['login']);
                 break;
             case users::AUTH_STATUS_2FA:
                 $this->redirect_to = self::REDIRECT_URL_2FA;
                 break;
             default:
                 //Успешная авторизация
                 if ($uid > 0) {
                     $default_location = is_emp() ? '/tu/' : '/projects/';
                     $ref_uri = isset($_SESSION['ref_uri']) ? urldecode($_SESSION['ref_uri']) : null;
                     $ref_uri = !$ref_uri ? $default_location : $ref_uri;
                     $location = HTTP_PFX . $_SERVER['HTTP_HOST'] . $ref_uri;
                     // #0012501
                     $location = preg_replace("/\\/router\\.php\\?pg=/", "", $location);
                     // #0011589
                     if (strpos($location, '/remind/') || strpos($location, 'inactive.php') || strpos($location, 'checkpass.php') || strpos($location, '/registration/') || strpos($location, 'fbd.php')) {
                         $location = $default_location;
                     }
                     session_write_close();
                     //Отправляем в очередь событие об успешной авторизации
                     require_once ABS_PATH . '/classes/statistic/StatisticFactory.php';
                     require_once ABS_PATH . '/classes/users.php';
                     $ga = StatisticFactory::getInstance('GA');
                     $ga->queue('event', array('uid' => $uid, 'cid' => users::getCid(), 'category' => is_emp() ? 'customer' : 'freelancer', 'action' => 'authorization_passed', 'label' => 'email'));
                     $this->redirect_to = $location;
                 }
         }
     }
     return $valid;
 }
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:56,代码来源:LoginForm.php


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