@@ -69,6 +69,10 @@ |
||
69 | 69 | return delete_data("DELETE FROM pleio_request_access WHERE id = {$this->id}"); |
70 | 70 | } |
71 | 71 | |
72 | + /** |
|
73 | + * @param string $subject |
|
74 | + * @param string $body |
|
75 | + */ |
|
72 | 76 | private function sendEmail($subject, $body, $params = null) { |
73 | 77 | $site = elgg_get_site_entity(); |
74 | 78 |
@@ -2,6 +2,10 @@ discard block |
||
2 | 2 | namespace ModPleio; |
3 | 3 | |
4 | 4 | class Helpers { |
5 | + |
|
6 | + /** |
|
7 | + * @return string |
|
8 | + */ |
|
5 | 9 | public static function generateUsername($username) { |
6 | 10 | $hidden = access_show_hidden_entities(true); |
7 | 11 | |
@@ -101,6 +105,9 @@ discard block |
||
101 | 105 | return ($result !== false); |
102 | 106 | } |
103 | 107 | |
108 | + /** |
|
109 | + * @return string |
|
110 | + */ |
|
104 | 111 | public static function getSiteEmail() { |
105 | 112 | global $CONFIG; |
106 | 113 |
@@ -148,6 +148,9 @@ |
||
148 | 148 | return $result; |
149 | 149 | } |
150 | 150 | |
151 | + /** |
|
152 | + * @return string |
|
153 | + */ |
|
151 | 154 | public function getUserByAttributes($data) { |
152 | 155 | $user = false; |
153 | 156 |
@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace ModPleio; |
3 | 3 | use ModPleio\Exceptions\ShouldRegisterException as ShouldRegisterException; |
4 | -use ModPleio\Exceptions\ShouldValidateException as ShouldValidateException; |
|
5 | 4 | use ModPleio\Exceptions\CouldNotLoginException as CouldNotLoginException; |
6 | 5 | |
7 | 6 | class LoginHandler { |
@@ -281,6 +281,9 @@ |
||
281 | 281 | return substr(strrchr($email, "@"), 1); |
282 | 282 | } |
283 | 283 | |
284 | +/** |
|
285 | + * @param string $domain |
|
286 | + */ |
|
284 | 287 | function pleio_domain_in_whitelist($domain) { |
285 | 288 | $plugin_setting = elgg_get_plugin_setting("domain_whitelist", "pleio"); |
286 | 289 | $domains = $plugin_setting ? explode(",", $plugin_setting) : []; |