Closed jeabakker closed 4 years ago
I am not sure if this is the ideal solution but adding the below mentioned code at the beginning of "validateRegisterAction" function within the User class solved my problem.
Adding this:
$hook_params = ['request' => $request];
$result = $request->elgg()->hooks->trigger('action:validate', 'register', $hook_params, true);
if (!$result) {
return;
}
at this location: https://github.com/ColdTrick/profile_manager/blob/388917b49b0f56aa44c341dc05df77a053180908/classes/ColdTrick/ProfileManager/Users.php#L151
Please let me know if this looks fine. I will create a PR for this. Request you to please reply at the earliest as I want this issue to be resolved. I am getting too many spammers in my site and as long as this issue wont be fixed SpamLoginFilter plugin won't work.
@jeabakker , @jdalsem - Any update for my comment above?
it should be fixed by adding the ActionMiddleware
middleware here https://github.com/ColdTrick/profile_manager/blob/388917b49b0f56aa44c341dc05df77a053180908/elgg-plugin.php#L67
Currently it's overruling all middleware
ref: https://github.com/Elgg/Elgg/issues/12952