Subversion Repositories oidplus

Rev

Rev 1177 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1177 Rev 1282
Line 45... Line 45...
45
         * @param string $name
45
         * @param string $name
46
         * @param mixed|null $default
46
         * @param mixed|null $default
47
         * @return mixed|null
47
         * @return mixed|null
48
         */
48
         */
49
        public function getValue(string $name, $default=null) {
49
        public function getValue(string $name, $default=null) {
-
 
50
                if ($name == 'SERVER_SECRET') {
-
 
51
                        $caller_class = debug_backtrace()[1]['class'];
-
 
52
                        if (!str_starts_with($caller_class, 'ViaThinkSoft\\OIDplus\\')) {
-
 
53
                                throw new OIDplusException(_L('Outdated plugin: Calling %1 from a plugin is deprecated. Please use %2 instead', 'SERVER_SECRET', 'OIDplus::authUtils()->makeSecret()'));
-
 
54
                        }
-
 
55
                }
50
                return $this->exists($name) ? $this->data[$name] : $default;
56
                return $this->exists($name) ? $this->data[$name] : $default;
51
        }
57
        }
52
 
58
 
53
        /**
59
        /**
54
         * @param string $name
60
         * @param string $name