Subversion Repositories oidplus

Rev

Rev 1267 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1267 Rev 1293
Line 24... Line 24...
24
// phpcs:enable PSR1.Files.SideEffects
24
// phpcs:enable PSR1.Files.SideEffects
25
 
25
 
26
class OIDplusPageRaChangePassword extends OIDplusPagePluginRa {
26
class OIDplusPageRaChangePassword extends OIDplusPagePluginRa {
27
 
27
 
28
        /**
28
        /**
29
         * @param string $actionID
-
 
30
         * @param array $params
29
         * @param array $params
31
         * @return array
30
         * @return array
32
         * @throws OIDplusException
31
         * @throws OIDplusException
33
         */
32
         */
34
        public function action(string $actionID, array $params): array {
33
        private function action_Update(array $params): array {
35
                if ($actionID == 'change_ra_password') {
-
 
36
                        _CheckParamExists($params, 'email');
34
                _CheckParamExists($params, 'email');
37
 
35
 
38
                        $email = $params['email'];
36
                $email = $params['email'];
39
 
37
 
40
                        $res = OIDplus::db()->query("select * from ###ra where email = ?", array($email));
38
                $res = OIDplus::db()->query("select * from ###ra where email = ?", array($email));
Line 80... Line 78...
80
                                OIDplus::logger()->log("V2:[OK/WARN]RA(%1)+[OK/INFO]A", "Password of RA '%1' created", $email);
78
                        OIDplus::logger()->log("V2:[OK/WARN]RA(%1)+[OK/INFO]A", "Password of RA '%1' created", $email);
81
                        }
79
                }
82
                        $ra->change_password($password1);
80
                $ra->change_password($password1);
83
 
81
 
84
                        return array("status" => 0);
82
                return array("status" => 0);
-
 
83
        }
-
 
84
 
-
 
85
        /**
-
 
86
         * @param string $actionID
-
 
87
         * @param array $params
-
 
88
         * @return array
-
 
89
         * @throws OIDplusException
-
 
90
         */
-
 
91
        public function action(string $actionID, array $params): array {
-
 
92
                if ($actionID == 'change_ra_password') {
-
 
93
                        return $this->action_Update($params);
85
                } else {
94
                } else {
86
                        return parent::action($actionID, $params);
95
                        return parent::action($actionID, $params);
87
                }
96
                }
88
        }
97
        }
89
 
98