Rev 1267 | Go to most recent revision | 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 OIDplusPageRaEditContactData extends OIDplusPagePluginRa { |
26 | class OIDplusPageRaEditContactData 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_data') { |
- | |
36 | _CheckParamExists($params, 'email'); |
34 | _CheckParamExists($params, 'email'); |
37 | 35 | ||
38 | $email = $params['email']; |
36 | $email = $params['email']; |
39 | 37 | ||
40 | if (!OIDplus::authUtils()->isRaLoggedIn($email) && !OIDplus::authUtils()->isAdminLoggedIn()) { |
38 | if (!OIDplus::authUtils()->isRaLoggedIn($email) && !OIDplus::authUtils()->isAdminLoggedIn()) { |
Line 72... | Line 70... | ||
72 | OIDplus::db()->query("UPDATE ###ra SET fax = ? WHERE email = ?", array($params['fax'], $email)); |
70 | OIDplus::db()->query("UPDATE ###ra SET fax = ? WHERE email = ?", array($params['fax'], $email)); |
73 | 71 | ||
74 | OIDplus::db()->query("UPDATE ###ra SET updated = ".OIDplus::db()->sqlDate()." WHERE email = ?", array($email)); |
72 | OIDplus::db()->query("UPDATE ###ra SET updated = ".OIDplus::db()->sqlDate()." WHERE email = ?", array($email)); |
75 | 73 | ||
76 | return array("status" => 0); |
74 | return array("status" => 0); |
- | 75 | } |
|
- | 76 | ||
- | 77 | /** |
|
- | 78 | * @param string $actionID |
|
- | 79 | * @param array $params |
|
- | 80 | * @return array |
|
- | 81 | * @throws OIDplusException |
|
- | 82 | */ |
|
- | 83 | public function action(string $actionID, array $params): array { |
|
- | 84 | if ($actionID == 'change_ra_data') { |
|
- | 85 | return $this->action_Update($params); |
|
77 | } else { |
86 | } else { |
78 | return parent::action($actionID, $params); |
87 | return parent::action($actionID, $params); |
79 | } |
88 | } |
80 | } |
89 | } |
81 | 90 |