コード例 #1
0
ファイル: Auth.php プロジェクト: pcmasteratings/site
 public static function processAuth()
 {
     if (array_key_exists("logout", $_GET)) {
         session_destroy();
         unset($_SESSION[self::$SESSION_USER_ID]);
     }
     $auth = new RedditAuth();
     $auth->processAuthResponse();
 }
コード例 #2
0
ファイル: RedditAuth.php プロジェクト: nirkbirk/site
 public static function setRedirectUrl($url)
 {
     if (!isset(self::$redirectUrl)) {
         self::$redirectUrl = $url;
     }
 }
コード例 #3
0
ファイル: config.php プロジェクト: nirkbirk/site
<?php

$serviceContainer = \Propel\Runtime\Propel::getServiceContainer();
$serviceContainer->checkVersion('2.0.0-dev');
$serviceContainer->setAdapterClass('default', 'mysql');
$manager = new \Propel\Runtime\Connection\ConnectionManagerSingle();
$manager->setConfiguration(array('dsn' => 'mysql:host=localhost;dbname=pcmratings', 'user' => 'pcmratings', 'password' => '', 'settings' => array('charset' => 'utf8', 'queries' => array()), 'classname' => '\\Propel\\Runtime\\Connection\\ConnectionWrapper'));
$manager->setName('default');
$serviceContainer->setConnectionManager('default', $manager);
$serviceContainer->setDefaultDatasource('default');
//GB apikey - if you need one, ask or get your own from GB.
GBApi::setApiKey('');
//RedditAuth
RedditAuth::setClientId('');
//public client id, accessible from your reddit API developer page
RedditAuth::setClientSecret('');
//private "secret", accessible from your reddit API developer page
RedditAuth::setRedirectUrl('');
//set this to http://[your host]/index.php e.g. http://pcmr.darkholme.net/index.php