If anonymous users are not allowed to enter a registration code, OGUR should not output the og_register fieldset at all.
Due to wrong line endings in CVS, my client seems to be unable to generate a proper patch. (Please fix this, too)
old:
function og_user_roles_form_alter(&$form, $form_state, $form_id) {
// If this is a registration form, put the Group Register box on it if appropriate.
// Anonymous users need 'use registration codes' permission
// 'Allow Registration Codes' in OGUR settings must be checked on.
if ($form_id == 'user_register') {
new:
function og_user_roles_form_alter(&$form, $form_state, $form_id) {
// If this is a registration form, put the Group Register box on it if appropriate.
// Anonymous users need 'use registration codes' permission
// 'Allow Registration Codes' in OGUR settings must be checked on.
if ($form_id == 'user_register' && user_access('use registration codes')) {
Comments
Comment #1
somebodysysop commentedWhat's this for?
Comment #2
sunWell, I wanted to supply a proper patch, but as mentioned in the original post:
Due to wrong line endings in CVS, my client seems to be unable to generate a proper patch. (Please fix this, too)
I.e.: Just editing one line in the module file results in this patch file. Don't blame me - I even deleted the checkout, started from scratch, and still got the same result. This is weird. I'm creating a buzz of patches for Drupal a day and never experienced this issue with any other module.
Comment #3
somebodysysop commentedI think the editor I use is putting in tabs. On my list of things to do is to go through and get the module up to Drupal standards. If that one line is the only thing that needs to be changed, I should have that done and committed to dev in the next day.
Thanks!
Comment #4
somebodysysop commentedCommitted to dev branch.
Comment #6
johnhanley commentedSame problem exists in 5.x-3.7.
Comment #7
sunComment #8
dman commentedHere's *a* patch, although it includes a comment as I'm working on a production site for someone else and need to notate branches from official releases.
The 'patch' is two words, and is easier to commit by hand.
Comment #9
sunI don't think that 5.x-3.x will see any further commits. At least it became quite quiet around SomebodySysop since the rewritten OGUR 4.x exists... ;)
Hence, closing this issue.
@SomebodySysop: Would it make sense if I'd take over project ownership?
Comment #10
somebodysysop commented@Sun:
I have been engaged on another project for the past few months which took me away from OGUR. I assumed that folks who needed immediate assistance would use OGUR 4.x. I had no idea whatsoever that you would unilaterally take it upon yourself to either close or mark as "won't fix" OGUR 1.x issues.
Let me make this clear: While I wholeheartedly support the growth of OGUR 4.x, I have no intent whatsoever of abandoning OGUR 1.x and the folks who still use and depend on it. I apologize if my absence from this forum gave anyone that opinion.
As concerns OGUR 1.x issues, I would prefer if you would let me address those myself.