| @@ 47-55 (lines=9) @@ | ||
| 44 | ); |
|
| 45 | ||
| 46 | // @todo should registration be allowed no matter what the plugins return? |
|
| 47 | if (!elgg_trigger_plugin_hook('register', 'user', $params, TRUE)) { |
|
| 48 | $ia = elgg_set_ignore_access(true); |
|
| 49 | $new_user->delete(); |
|
| 50 | elgg_set_ignore_access($ia); |
|
| 51 | // @todo this is a generic messages. We could have plugins |
|
| 52 | // throw a RegistrationException, but that is very odd |
|
| 53 | // for the plugin hooks system. |
|
| 54 | throw new RegistrationException(elgg_echo('registerbad')); |
|
| 55 | } |
|
| 56 | ||
| 57 | elgg_clear_sticky_form('register'); |
|
| 58 | ||
| @@ 185-193 (lines=9) @@ | ||
| 182 | ); |
|
| 183 | ||
| 184 | // @todo should registration be allowed no matter what the plugins return? |
|
| 185 | if (!elgg_trigger_plugin_hook('register', 'user', $params, TRUE)) { |
|
| 186 | $ia = elgg_set_ignore_access(true); |
|
| 187 | $new_user->delete(); |
|
| 188 | elgg_set_ignore_access($ia); |
|
| 189 | // @todo this is a generic messages. We could have plugins |
|
| 190 | // throw a RegistrationException, but that is very odd |
|
| 191 | // for the plugin hooks system. |
|
| 192 | throw new RegistrationException(elgg_echo('registerbad')); |
|
| 193 | } |
|
| 194 | ||
| 195 | elgg_clear_sticky_form('register'); |
|
| 196 | system_message(elgg_echo("registerok", array(elgg_get_site_entity()->name))); |
|
| @@ 312-317 (lines=6) @@ | ||
| 309 | $hook_params = $record; |
|
| 310 | $hook_params['user'] = $user; |
|
| 311 | ||
| 312 | if (!elgg_trigger_plugin_hook('register', 'user', $hook_params, TRUE)) { |
|
| 313 | $ia = elgg_set_ignore_access(true); |
|
| 314 | $user->delete(); |
|
| 315 | elgg_set_ignore_access($ia); |
|
| 316 | throw new RegistrationException(elgg_echo('registerbad')); |
|
| 317 | } |
|
| 318 | ||
| 319 | if ($this->notification) { |
|
| 320 | $subject = elgg_echo('upload_users:email:subject', elgg_get_config('sitename')); |
|