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


PHP Character::updateCharacterInfo方法代码示例

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


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

示例1: ApiKey

require 'includes/header-no-nav.php';
//Checking to see if we've already submitted registration
if (isset($_POST['username'])) {
    //We have, registering the account
    $keyAddition = new ApiKey($_POST['keyID'], $_POST['vCode'], 0, $db);
    $success = User::doRegistration($_POST['username'], $_POST['password'], $_POST['password_verify'], $_POST['default_id'], $db);
    if ($success) {
        $stmt = $db->prepare('SELECT * FROM user_accounts WHERE username = ? LIMIT 1');
        $stmt->execute(array($_POST['username']));
        $accountInfo = $stmt->fetch();
        $keyAddition = new ApiKey($_POST['keyID'], $_POST['vCode'], $accountInfo['uid'], $db);
        $keyAddition->updateAPIKey();
        $char = new Character($_POST['default_id'], $keyAddition->getKeyID(), $keyAddition->getVCode(), $keyAddition->getAccessMask(), $db, $accountInfo['uid']);
        if ($char->getExistance() or $char->getExistance() == FALSE) {
            $char->updateCharacterInfo();
        }
        $register_success = TRUE;
    } else {
        $register_success = FALSE;
    }
}
?>

    <div class="opaque-container" style="height: 100%; padding-bottom: 50px; margin-top: 10%">

	    <div class="row" style="width: 100%;">
		<?php 
if ($request['action'] == '1' or !$request['action']) {
    ?>
			<div class="col-md-offset-4 col-md-4 col-sm-offset-2 col-sm-8 mobile-reconfig" style="padding-right: 0px">
开发者ID:ArgusDrise,项目名称:eveadmin,代码行数:30,代码来源:register.php

示例2: refreshAPIKey

 public function refreshAPIKey($type)
 {
     global $settings;
     if ($this->keyStatus == 1 and $this->accessMask == MINIMUM_API and $this->expires == 'No Expiration' and $this->keyType == 'Account') {
         $update = $this->updateAPIKey();
         if ($update) {
             if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications() and $type == 'new') {
                 sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'New API Key submitted by ' . User::fetchUserName($this->uid) . '.', 'aura', 'chat.postMessage');
             }
             $character_array = array();
             foreach ($this->getCharacters() as $character) {
                 $character_array[$character['characterID']] = $character['characterID'];
                 $char = new Character($character['characterID'], $this->keyID, $this->vcode, $this->accessMask, $this->db, $this->uid);
                 if ($char->getExistance() or $char->getExistance() == FALSE) {
                     $char->updateCharacterInfo();
                     $char->updateCharacterSkills();
                 }
             }
             $stmt = $this->db->prepare('UPDATE core_cron SET cron_updated = 1 WHERE api_keyID = ?');
             $stmt->execute(array($this->keyID));
             $this->removeOrphanedCharacter($this->keyID, $this->uid, $character_array);
             return TRUE;
         }
     } elseif ($this->keyStatus != 1 and $type == 'new') {
         if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications()) {
             sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'API Key submitted by ' . User::fetchUserName($this->uid) . ' has been rejected as it is invalid.', 'aura', 'chat.postMessage');
         }
         setAlert('danger', 'The API Key Is Invalid', 'The API Key provided is invalid and cannot be used. Please create a new API key, and ensure you have copied the keyID and verification code correctly.');
     } elseif (!($this->accessMask == MINIMUM_API) and $this->getKeyStatus() == 1 and $type == "new") {
         if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications()) {
             sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'API Key submitted by ' . User::fetchUserName($this->uid) . ' has been rejected due to an incorrect access mask.', 'aura', 'chat.postMessage');
         }
         setAlert('danger', 'The API Key Does Not Meet Minimum Requirements', 'The required minimum Access Mask for API keys is ' . MINIMUM_API . '. Please create a new key using the Create Key link.');
     } elseif ($this->expires != 'No Expiration' and $type == "new") {
         if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications()) {
             sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'API Key submitted by ' . User::fetchUserName($this->uid) . ' has been rejected because it has an expiration.', 'aura', 'chat.postMessage');
         }
         setAlert('danger', 'The API Key Expires', 'The provided API Key has an expiration set. Please create a new key using the Create Key link and ensure you select the No Expiration checkbox.');
     } elseif ($this->keyType != 'Account' and $type == "new") {
         if ($settings->getSlackIntegration() and $settings->getSlackAPINotifications()) {
             sendComplexSlackNotification($settings->getSlackAuthToken(), $settings->getGroupTicker() . ' Auth Notifications', $settings->getSlackAPIChannel(), 'API Key submitted by ' . User::fetchUserName($this->uid) . ' has been rejected because it is a single character key.', 'aura', 'chat.postMessage');
         }
         setAlert('danger', 'The API Key Provided is Single-Character', 'All API Keys must be account-wide. Please create a new key using the Create Key link, and do not change the key from an Account Key to a Single Character key.');
     }
 }
开发者ID:jgrancell,项目名称:eveadmin-import,代码行数:45,代码来源:ApiKey.class.php


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