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.

Comments

hershel’s picture

File failed to attach. Here it is.

hershel’s picture

StatusFileSize
new1.88 KB

File name was altered during upload. Not sure why. Here is a zip.

tamerzg’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Why 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.

hershel’s picture

StatusFileSize
new8.41 KB

> Why you wouldn't help us and say what exactly doesn't work?

I wrote:

it failed to show the roles correctly on the user registration page.

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.

tamerzg’s picture

Status: Postponed (maintainer needs more info) » Needs review

Thank you for your efforts.

hershel’s picture

Happy to help if I can. Sorry if my initial post wasn't as positive as it could have been.

alisharifz’s picture

Title: Major Overhaul » Thanks
Component: Code » Documentation
Category: bug » task
Status: Needs review » Fixed

Thanks for creating this module tamerzg and thanks for fixing the module HershelSR. It saved me alot of time.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.