private static function setAttributes($user_id, $saml_display_name, $saml_email, $saml_groups, $saml_quota) { /*$secure_cookie = \OC_Config::getValue("forcessl", false); $expires = time() + \OC_Config::getValue('remember_login_cookie_lifetime', 60 * 60 * 24 * 15); setcookie("oc_display_name", $saml_display_name, $expires, \OC::$WEBROOT, '', $secure_cookie); setcookie("oc_mail", $saml_email, $expires, \OC::$WEBROOT, '', $secure_cookie); setcookie("oc_quota", $saml_quota, $expires, \OC::$WEBROOT, '', $secure_cookie); setcookie("oc_groups", json_encode($saml_groups), $expires, \OC::$WEBROOT, '', $secure_cookie);*/ self::setRedirectCookie(); $_SESSION["oc_display_name"] = $saml_display_name; $_SESSION["oc_mail"] = $saml_email; $_SESSION["oc_groups"] = $saml_groups; $_SESSION["oc_quota"] = $saml_quota; if (OCP\App::isEnabled('files_sharding') && OCA\FilesSharding\Lib::isMaster()) { //\OC_Util::setupFS(); // Let slaves know which folders are data folders $dataFolders = OCA\FilesSharding\Lib::dbGetDataFoldersList($user_id); $_SESSION["oc_data_folders"] = $dataFolders; // Have slaves use the same numeric ID for "storages". $view = \OC\Files\Filesystem::getView(); $rootInfo = $view->getFileInfo(''); $storageId = $rootInfo->getStorage()->getId(); $numericStorageId = OC\Files\Cache\Storage::getNumericStorageId($storageId); $_SESSION["oc_storage_id"] = $storageId; $_SESSION["oc_numeric_storage_id"] = $numericStorageId; } }
public function userExists($uid) { // This is only for ajax/ws calls when sharing if (\OCP\App::isEnabled('files_sharding') && !OCA\FilesSharding\Lib::isMaster() && empty(OC_User::getUser())) { $userExists = \OCA\FilesSharding\Lib::ws('userExists', array('user_id' => $uid)); return $userExists; } $this->loadUser($uid); return !empty($this->cache[$uid]); }