Item14098: Approve User Registration should not require Verify User Registration.
Priority: Normal
Current State: Closed
Released In: 2.1.3
Target Release: patch
With Approve User Registration set but not Verify User Registration, the new user is approved immediately.
Thinking about it, it makes sense to have the new user verify their email address before requesting approval. Therefore I've set verify on to fix the issue for me.
Perhaps setting approval on should force verify on?
"This site is running Foswiki version v2.1.2, Release Foswiki-2.1.2, Plugin API version 2.4"
--
DavidRimmer - 15 Jun 2016
The following patch appears to resolve the issue. It needs more testing, but worked for me.
diff --git a/core/lib/Foswiki/UI/Register.pm b/core/lib/Foswiki/UI/Register.pm
index 03d71b1..41f6074 100755
--- a/core/lib/Foswiki/UI/Register.pm
+++ b/core/lib/Foswiki/UI/Register.pm
@@ -134,6 +134,15 @@ sub _action_register {
_requireConfirmation( $session, $data, 'Verification', 'confirm',
$data->{Email} );
}
+ elsif ( $Foswiki::cfg{Register}{NeedApproval} ) {
+ my $query = $session->{request};
+ my $data = _getDataFromQuery( $session->{users}, $query );
+ $data->{FirstLastName} = $data->{Name};
+ my $approvers = $Foswiki::cfg{Register}{Approvers}
+ || $Foswiki::cfg{AdminUserWikiName};
+ _requireConfirmation( $session, $data, 'Approval', 'approve',
+ $approvers );
+ }
else {
# No need for confirmation
--
GeorgeClark - 17 Jun 2016
That's exactly what I would have done.
--
CrawfordCurrie - 17 Jun 2016
Needs some unit tests. I've had trouble coming up with one. Manual testing shows it works fine.
--
Main.GeorgeClark - 27 Jun 2016 - 01:59