Is there a way in the macro validate_registration_form to check to see if the email address is in the "Members" group? This would save me from having unauthorized members register for my site (authorized members would have already been added to the "Members" group).
There are two steps: 1 - Create an exception message and 2 - edit validate_registration_form macro.
This is just my suggestion, you can use it to make your own message and code:
Override handle_registration_errors, adding the exception:
<div class="error-message important" style="margin:1em;padding:.5em 0">
<t>You are not a Member.</t>
<t>You have already been registered.</t>
<a href="[n.forgot_password_path/]"><t>Forgot your password?</t></a>
Step 2: Checking if the email given in the registration field is in the Members group:
I'm getting this error when trying to save the handle_registration_errors macro:
Error: macro or method for 'is_submitted_form' not found in [basic, nabble, ad] stack = [basic, nabble, ad]
in is_submitted_form(custom_tweak:handle_registration_errors:2) - <n.if.is_submitted_form> in if(custom_tweak:handle_registration_errors:2) - <n.if.is_submitted_form> - public static void nabble.naml.namespaces.BasicNamespace._if(nabble.naml.compiler.IPrintWriter,nabble.naml.compiler.Interpreter)
in (custom_tweak:handle_registration_errors:1) - <override_macro name="handle_registration_errors">
I noticed it's not liking the is_submitted_form which is nothing I've changed. So I completely removed the macro changes and then just go in to Edit the macro, change nothing and save and get the same error.