function __construct()
 {
     $this->wp_instance = new OC_wordpress();
     $this->wp_instance->connectdb();
     $uid = OC_User::getUser();
     if ($uid) {
         $this->current_user_blogs = $this->wp_instance->getUserblogsIds($uid);
     }
     self::$params = $this->wp_instance->params;
 }
Пример #2
0
<?php

$baseuri = $_SERVER['REQUEST_URI'];
$vars = explode('/', $baseuri);
if (sizeof($vars) >= 4) {
    $hash = $vars[4];
    $uid = $vars[3];
    $wp = new OC_user_wordpress();
    if (!$wp->log_with_hash($uid, $hash)) {
        echo 'ERROR 1';
        exit;
    }
} else {
    echo 'ERROR 0';
    exit;
}
$baseuri = implode('/', array_slice($vars, 0, 5)) . '/';