Rev 1267 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1267 | Rev 1293 | ||
---|---|---|---|
Line 25... | Line 25... | ||
25 | // phpcs:enable PSR1.Files.SideEffects |
25 | // phpcs:enable PSR1.Files.SideEffects |
26 | 26 | ||
27 | class OIDplusPagePublicRaBaseUtils extends OIDplusPagePluginPublic { |
27 | class OIDplusPagePublicRaBaseUtils extends OIDplusPagePluginPublic { |
28 | 28 | ||
29 | /** |
29 | /** |
30 | * @param string $actionID |
- | |
31 | * @param array $params |
30 | * @param array $params email |
32 | * @return array |
31 | * @return array |
33 | * @throws OIDplusException |
32 | * @throws OIDplusException |
34 | */ |
33 | */ |
35 | public function action(string $actionID, array $params): array { |
34 | private function action_Delete(array $params): array { |
36 | - | ||
37 | // Action: delete_ra |
- | |
38 | // Method: POST |
- | |
39 | // Parameters: email |
- | |
40 | // Outputs: Text |
- | |
41 | if ($actionID == 'delete_ra') { |
- | |
42 | _CheckParamExists($params, 'email'); |
35 | _CheckParamExists($params, 'email'); |
43 | 36 | ||
44 | $email = $params['email']; |
37 | $email = $params['email']; |
45 | 38 | ||
46 | $ra_logged_in = OIDplus::authUtils()->isRaLoggedIn($email); |
39 | $ra_logged_in = OIDplus::authUtils()->isRaLoggedIn($email); |
Line 59... | Line 52... | ||
59 | $ra = null; |
52 | $ra = null; |
60 | 53 | ||
61 | OIDplus::logger()->log("V2:[OK/WARN]RA(%1)+[OK/INFO]A", "RA '%1' deleted", $email); |
54 | OIDplus::logger()->log("V2:[OK/WARN]RA(%1)+[OK/INFO]A", "RA '%1' deleted", $email); |
62 | 55 | ||
63 | return array("status" => 0); |
56 | return array("status" => 0); |
- | 57 | } |
|
- | 58 | ||
- | 59 | /** |
|
- | 60 | * @param string $actionID |
|
- | 61 | * @param array $params |
|
- | 62 | * @return array |
|
- | 63 | * @throws OIDplusException |
|
- | 64 | */ |
|
- | 65 | public function action(string $actionID, array $params): array { |
|
- | 66 | if ($actionID == 'delete_ra') { |
|
- | 67 | return $this->action_Delete($params); |
|
64 | } else { |
68 | } else { |
65 | return parent::action($actionID, $params); |
69 | return parent::action($actionID, $params); |
66 | } |
70 | } |
67 | - | ||
68 | } |
71 | } |
69 | 72 | ||
70 | /** |
73 | /** |
71 | * @param bool $html |
74 | * @param bool $html |
72 | * @return void |
75 | * @return void |