Demo entry 6631956

test

   

Submitted by anonymous on Jul 20, 2017 at 10:46
Language: PHP. Code size: 654 Bytes.

<?php
namespace OCA\SingleSignOn1;

class RedirectRegion implements IRedirectRegion{
    public static function getRegionUrl($region) {
        $request = \OC::$server->getRequest();
        $requestUri = $request->getRequestUri();
        $config = \OC::$server->getSystemConfig();
        $regions = $config->getValue("sso_regions");
        $authInfo = AuthInfo::get();
        $authInfo["asus"] = true;
        $redirectUrl = $config->getValue("sso_owncloud_url")[$regions[$region]]. '/index.php';
        $url = $request->getServerProtocol() . "://" . $redirectUrl . "?" . http_build_query($authInfo);

        return $url;
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).