@@ -1,93 +1,93 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * |
|
4 | - * 2FA extension for the phpBB Forum Software package. |
|
5 | - * |
|
6 | - * @copyright (c) 2015 Paul Sohier |
|
7 | - * @license GNU General Public License, version 2 (GPL-2.0) |
|
8 | - * |
|
9 | - */ |
|
3 | + * |
|
4 | + * 2FA extension for the phpBB Forum Software package. |
|
5 | + * |
|
6 | + * @copyright (c) 2015 Paul Sohier |
|
7 | + * @license GNU General Public License, version 2 (GPL-2.0) |
|
8 | + * |
|
9 | + */ |
|
10 | 10 | |
11 | 11 | namespace paul999\tfa\modules; |
12 | 12 | |
13 | 13 | interface module_interface |
14 | 14 | { |
15 | - /** |
|
16 | - * Return if this module is enabled by the admin |
|
17 | - * (And all server requirements are met). |
|
18 | - * |
|
19 | - * Do not return false in case a specific user disabeld this module, |
|
20 | - * OR if the user is unable to use this specific module. |
|
21 | - * @return boolean |
|
22 | - */ |
|
23 | - public function is_enabled(); |
|
15 | + /** |
|
16 | + * Return if this module is enabled by the admin |
|
17 | + * (And all server requirements are met). |
|
18 | + * |
|
19 | + * Do not return false in case a specific user disabeld this module, |
|
20 | + * OR if the user is unable to use this specific module. |
|
21 | + * @return boolean |
|
22 | + */ |
|
23 | + public function is_enabled(); |
|
24 | 24 | |
25 | - /** |
|
26 | - * Check if the current user is able to use this module. |
|
27 | - * |
|
28 | - * This means that the user enabled it in the UCP, |
|
29 | - * And has it setup up correctly. |
|
30 | - * This method will be called during login, not during registration/ |
|
31 | - * |
|
32 | - * @param int $user_id |
|
33 | - * @return bool |
|
34 | - */ |
|
35 | - public function is_usable($user_id); |
|
25 | + /** |
|
26 | + * Check if the current user is able to use this module. |
|
27 | + * |
|
28 | + * This means that the user enabled it in the UCP, |
|
29 | + * And has it setup up correctly. |
|
30 | + * This method will be called during login, not during registration/ |
|
31 | + * |
|
32 | + * @param int $user_id |
|
33 | + * @return bool |
|
34 | + */ |
|
35 | + public function is_usable($user_id); |
|
36 | 36 | |
37 | - /** |
|
38 | - * Check if the user can potentially use this. |
|
39 | - * This method is called at registration page. |
|
40 | - * |
|
41 | - * You can, for example, check if the current browser is suitable. |
|
42 | - * |
|
43 | - * @param int $user_id |
|
44 | - * @return bool |
|
45 | - */ |
|
46 | - public function is_potentially_usable($user_id); |
|
37 | + /** |
|
38 | + * Check if the user can potentially use this. |
|
39 | + * This method is called at registration page. |
|
40 | + * |
|
41 | + * You can, for example, check if the current browser is suitable. |
|
42 | + * |
|
43 | + * @param int $user_id |
|
44 | + * @return bool |
|
45 | + */ |
|
46 | + public function is_potentially_usable($user_id); |
|
47 | 47 | |
48 | - /** |
|
49 | - * Get the priority for this module. |
|
50 | - * A lower priority means more chance it gets selected as default option |
|
51 | - * |
|
52 | - * There can be only one module with a specific priority! |
|
53 | - * If there is already a module registered with this priority, |
|
54 | - * a Exception might be thrown |
|
55 | - * |
|
56 | - * @param int $user_id If set, the priority can depend on the current user |
|
57 | - * @return int |
|
58 | - */ |
|
59 | - public function get_priority($user_id = 0); |
|
48 | + /** |
|
49 | + * Get the priority for this module. |
|
50 | + * A lower priority means more chance it gets selected as default option |
|
51 | + * |
|
52 | + * There can be only one module with a specific priority! |
|
53 | + * If there is already a module registered with this priority, |
|
54 | + * a Exception might be thrown |
|
55 | + * |
|
56 | + * @param int $user_id If set, the priority can depend on the current user |
|
57 | + * @return int |
|
58 | + */ |
|
59 | + public function get_priority($user_id = 0); |
|
60 | 60 | |
61 | - /** |
|
62 | - * Start of the login procedure. |
|
63 | - * @param int $user_id |
|
64 | - * @return int |
|
65 | - */ |
|
66 | - public function login_start($user_id); |
|
61 | + /** |
|
62 | + * Start of the login procedure. |
|
63 | + * @param int $user_id |
|
64 | + * @return int |
|
65 | + */ |
|
66 | + public function login_start($user_id); |
|
67 | 67 | |
68 | - /** |
|
69 | - * Actual login procedure |
|
70 | - * @param int $user_id |
|
71 | - */ |
|
72 | - public function login($user_id); |
|
68 | + /** |
|
69 | + * Actual login procedure |
|
70 | + * @param int $user_id |
|
71 | + */ |
|
72 | + public function login($user_id); |
|
73 | 73 | |
74 | - /** |
|
75 | - * Start of registration |
|
76 | - * @return void |
|
77 | - */ |
|
78 | - public function register_start(); |
|
74 | + /** |
|
75 | + * Start of registration |
|
76 | + * @return void |
|
77 | + */ |
|
78 | + public function register_start(); |
|
79 | 79 | |
80 | - /** |
|
81 | - * Actual registration |
|
82 | - * @return void |
|
83 | - */ |
|
84 | - public function register(); |
|
80 | + /** |
|
81 | + * Actual registration |
|
82 | + * @return void |
|
83 | + */ |
|
84 | + public function register(); |
|
85 | 85 | |
86 | - /** |
|
87 | - * This method is called to show the UCP page. |
|
88 | - * You can assign template variables to the template, or do anything else here. |
|
89 | - */ |
|
90 | - public function show_ucp(); |
|
86 | + /** |
|
87 | + * This method is called to show the UCP page. |
|
88 | + * You can assign template variables to the template, or do anything else here. |
|
89 | + */ |
|
90 | + public function show_ucp(); |
|
91 | 91 | |
92 | 92 | /** |
93 | 93 | * Delete a specific row from the UCP. |