- 🇨🇦Canada teknocat
This is still an issue in the 3.x branch and would be ideal to have a solution for.
- 🇨🇦Canada teknocat
Having a look at the code, it looks like the completeAuthorization function should be able to take care of this.
It is supposed to only display the message 'The username %name has not been activated or is blocked.' if
$context['is_new']is empty. But this is always empty because a few lines above that when creating a new account, it does not add 'is_new' with a value of TRUE to the $context array, it just passes $context with that added on the fly into the saveUserinfo method. That's an easy fix by adding a line prior to the call to $this->saveUserinfo() that sets$context['is_new'] = TRUE;.Then if the account is blocked but is new and pending administrator approval it should just return TRUE. That will make the controller think everything was hunky-dory and thus prevent the second error message from being displayed saying that logging in with the specified method could not be completed due to an error.
I'll update this issue to apply to the 3.x branch and submit a patch once I can try this out, test and make sure it works.
- @teknocat opened merge request.