Esempio n. 1
0
/**
 * Check whether someone is logged into their account.
 *
 * @return boolean
 */
function is_logged_in()
{
    return (bool) account_id();
}
Esempio n. 2
0
function get_logged_in_account_id()
{
    return account_id();
}
Esempio n. 3
0
function self_account_info()
{
    return account_info(account_id());
}
Esempio n. 4
0
 /**
  */
 private function render($parts)
 {
     // default parts
     $account_info = account_info(account_id());
     // Get the existing oauth info, if any.
     $oauth_provider = $account_info['oauth_provider'];
     $oauth = $oauth_provider && $account_info['oauth_id'];
     $player = new Player(self_char_id());
     $self_info = $player->dataWithClan();
     $gravatar_url = $player->avatarUrl();
     $parts = array_merge(['gravatar_url' => $gravatar_url, 'player' => $self_info, 'account_info' => $account_info, 'oauth_provider' => $oauth_provider, 'oauth' => $oauth, 'successMessage' => false, 'error' => false, 'command' => '', 'delete_attempts' => 0], $parts);
     return ['template' => 'account.tpl', 'title' => 'Your Account', 'parts' => $parts, 'options' => ['quickstat' => 'player']];
 }