Ejemplo n.º 1
0
 public static function init()
 {
     if (!Social_Client::$finish) {
         Social_Client::$finish = true;
         try {
             require_once realpath(dirname(__FILE__)) . "/Session.php";
             $session = new Social_Session();
             if (!$session->get("sa_config")) {
                 header("HTTP/1.0 404 Not Found");
                 die("Direct access not allowed");
                 Social_Logger::error("Direct access not allowed, ");
             }
             Social_Auth::init($session->get("sa_config"));
         } catch (Exception $e) {
             Social_Logger::error("Error occured while Social_Auth init");
             header("HTTP/1.0 404 Not Found");
             die("Error occured!");
         }
     }
 }
Ejemplo n.º 2
0
 public static function checkRequirements()
 {
     if (!function_exists('curl_init')) {
         Social_Logger::error('Curl extension needed!');
         throw new Social_Exception("Curl extenson needed!", 1);
     }
     if (!function_exists('json_decode')) {
         Social_Logger::error('JSON extension needed!');
         throw new Exception('JSON extension needed!');
     }
     if (session_name() != "PHPSESSID") {
         Social_Logger::info('Custom session name detected!');
     }
     if (ini_get('safe_mode')) {
         Social_Logger::info('safe_mode is on');
     }
     // open basedir is on
     if (ini_get('open_basedir')) {
         Social_Logger::info('open_basedir is on');
     }
 }
Ejemplo n.º 3
0
 function getUserContacts()
 {
     Social_Logger::error("Social_Auth do not provide users contacts for {$this->network_name}.");
     throw new Social_Exception("This feature has not been implemented");
 }