| @@ -88,10 +88,12 @@ | ||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | public function onAcymBeforeUserCreate(&$user) |
| 91 | 91 | { |
| 92 | + // CTE isn't installed | |
| 92 | 93 | if (!acym_isAcyCheckerInstalled()) return true; |
| 93 | 94 | |
| 95 | + // The email verification is disabled in the configuration | |
| 94 | 96 | if ($this->config->get('email_verification') == 0) return true; |
| 95 | 97 | |
| 96 | 98 | $this->loadAcychecker(); |
| 97 | 99 | |
| @@ -97,12 +99,15 @@ | ||
| 97 | 99 | |
| 98 | 100 | $cteConfig = ConfigurationClass::getConfiguration(); |
| 99 | 101 | $conditions = $cteConfig->get('registration_conditions'); |
| 100 | 102 | |
| 103 | + // If no condition is selected, return | |
| 101 | 104 | if (empty($conditions) || $conditions === 'domain_not_exists') return true; |
| 102 | 105 | |
| 106 | + // Perform test using CTE code API | |
| 103 | 107 | $apiService = new ApiService(); |
| 104 | 108 | |
| 109 | + // Retro compatibility for AcyChecker 1.4 | |
| 105 | 110 | if (method_exists($apiService, 'testUser')) { |
| 106 | 111 | $testUser = new stdClass(); |
| 107 | 112 | $testUser->email = $user->email; |
| 108 | 113 | $testUser->name = $user->name; |