This module does not work correctly. I tried it and it failed to show the roles correctly on the user registration page. I examined the code and it is flawed and it furthermore was written with complete disregard to Drupal Coding standards.
Attached is a rewritten version of the code which appears to work for me. I cleaned up the formatting on most of the code and I also fixed the English to be grammatically correct.
The module also is hardcoded to send approval emails to user id #1. Aside from this being a flaw, it's not documented. This I left alone for now.
If I need to make further edits to this module, I will try to post them here.
Any feedback is of course welcome.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | registration_role_with_approval.patch | 8.41 KB | hershel |
| #2 | registration_role_with_approval.module.zip | 1.88 KB | hershel |
| #1 | registration_role_with_approval.module.tar_.gz | 1.79 KB | hershel |
Comments
Comment #1
hershel commentedFile failed to attach. Here it is.
Comment #2
hershel commentedFile name was altered during upload. Not sure why. Here is a zip.
Comment #3
tamerzg commentedWhy you wouldn't help us and say what exactly doesn't work? Since we have been using this module successfully. Therefore I will remark this ticket as "normal".
Regarding sending e-mails to user ID 1 it is said on project page that e-mail is sent to administrator and administrator is always user id 1. If you thing this should be extended please open feature request ticket and we will consider it.
File you attached doesn't have any changes? And please upload a patch instead of whole file.
Regards.
Comment #4
hershel commented> Why you wouldn't help us and say what exactly doesn't work?
I wrote:
I was seeing:
Employer *needs administration approval
*needs administration approval
I.E the second one has no role. Seems that submitting the admin/settings/registration_role_with_approval page more than once can put values with zeroes in the variable registration_role_with_approval_profile_roles_approval, and then that role was being displayed, but without its role name. I'm not sure--I didn't debug the code fully--I just adjusted it so that it worked on the two test sites I ran it on.
> File you attached doesn't have any changes?
When I examine them I certainly see changes. Sometimes a full module file is easier to read than a patch when the majority of lines are edited. Attached now is a patch file.
> Regarding sending e-mails to user ID 1 it is said on project page that e-mail is sent to administrator and administrator is always user id 1
OK, I understand this point now.
Thank you.
Comment #5
tamerzg commentedThank you for your efforts.
Comment #6
hershel commentedHappy to help if I can. Sorry if my initial post wasn't as positive as it could have been.
Comment #7
alisharifz commentedThanks for creating this module tamerzg and thanks for fixing the module HershelSR. It saved me alot of time.