Horde_Registry::loadPrefs PHP Method

loadPrefs() public method

$app will be the active application after calling this function.
public loadPrefs ( string $app = null )
$app string The name of the application.
    public function loadPrefs($app = null)
    {
        global $injector, $prefs;
        if (strlen($app)) {
            $this->pushApp($app);
        } elseif (($app = $this->getApp()) === false) {
            $app = 'horde';
        }
        $user = $this->getAuth();
        if ($user) {
            if (isset($prefs) && $prefs->getUser() == $user) {
                $prefs->changeScope($app);
                return;
            }
            $opts = array('user' => $user);
        } else {
            /* If there is no logged in user, return an empty Horde_Prefs
             * object with just default preferences. */
            $opts = array('driver' => 'Horde_Prefs_Storage_Null');
        }
        $prefs = $injector->getInstance('Horde_Core_Factory_Prefs')->create($app, $opts);
    }