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


PHP account::signin方法代码示例

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


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

示例1: array

 $fullname = helper::escapeText($fullname);
 $password = helper::escapeText($password);
 $email = helper::escapeText($email);
 $language = helper::escapeText($language);
 if ($clientId != CLIENT_ID) {
     api::printError(ERROR_UNKNOWN, "Error client Id.");
 }
 $result = array("error" => true);
 $account = new account($dbo);
 $result = $account->signup($username, $fullname, $password, $email, $user_sex, $user_year, $user_month, $user_day);
 unset($account);
 if ($result['error'] === false) {
     $account = new account($dbo);
     $account->setState(ACCOUNT_STATE_ENABLED);
     $account->setLastActive();
     $result = $account->signin($username, $password);
     unset($account);
     if ($result['error'] === false) {
         $auth = new auth($dbo);
         $result = $auth->create($result['accountId'], $clientId);
         if ($result['error'] === false) {
             $account = new account($dbo, $result['accountId']);
             if (strlen($facebookId) != 0) {
                 $helper = new helper($dbo);
                 if ($helper->getUserIdByFacebook($facebookId) == 0) {
                     $account->setFacebookId($facebookId);
                 }
             } else {
                 $account->setFacebookId("");
             }
             if (strlen($gcm_regId) != 0) {
开发者ID:JohnWilliamsMSU,项目名称:Steady,代码行数:31,代码来源:account.signUp.inc.php

示例2: isset

 $gcm_regId = isset($_POST['gcm_regId']) ? $_POST['gcm_regId'] : '';
 $username = isset($_POST['username']) ? $_POST['username'] : '';
 $password = isset($_POST['password']) ? $_POST['password'] : '';
 $clientId = helper::clearInt($clientId);
 $gcm_regId = helper::clearText($gcm_regId);
 $username = helper::clearText($username);
 $password = helper::clearText($password);
 $gcm_regId = helper::escapeText($gcm_regId);
 $username = helper::escapeText($username);
 $password = helper::escapeText($password);
 if ($clientId != CLIENT_ID) {
     api::printError(ERROR_UNKNOWN, "Error client Id.");
 }
 $access_data = array();
 $account = new account($dbo);
 $access_data = $account->signin($username, $password);
 unset($account);
 if ($access_data["error"] === false) {
     $auth = new auth($dbo);
     $access_data = $auth->create($access_data['accountId'], $clientId);
     if ($access_data['error'] === false) {
         $account = new account($dbo, $access_data['accountId']);
         $account->setState(ACCOUNT_STATE_ENABLED);
         $account->setLastActive();
         $access_data['account'] = array();
         array_push($access_data['account'], $account->get());
         if (strlen($gcm_regId) != 0) {
             $account->setGCM_regId($gcm_regId);
         }
     }
 }
开发者ID:JohnWilliamsMSU,项目名称:Steady,代码行数:31,代码来源:account.signIn.inc.php


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