Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Jan 2016 at 17:11 UTC
Updated:
25 Nov 2018 at 16:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sushilck commentedSmalution created an issue. See original summary.
My reviews of other projects:
https://www.drupal.org/node/2642690#comment-10776176
https://www.drupal.org/node/2654502#comment-10775992
https://www.drupal.org/node/2651526#comment-10776482
Comment #2
PA robot commentedGit clone command for the sandbox is missing in the issue summary, please add it.
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #3
sushilck commentedComment #4
sushilck commentedUpdated the git clone command.
Few information regarding project.
Introduction:
This module allow user choose role during registration && Set roles which need admin approval.
Installation:
Install as you would normally install a contributed Drupal module. See:
https://drupal.org/documentation/install/modules-themes/modules-7
for further information.
Configuration
Configure user permissions in Administration » Registration Role Set By Admin.
Comment #5
sushilck commentedComment #6
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxsushilck2630130git
Fixed the git clone URL in the issue summary for non-maintainer users.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #7
sushilck commentedI have checked automated review tools and fixed those issue.
Comment #8
sushilck commentedComment #9
sushilck commentedComment #10
sushilck commentedComment #11
sushilck commentedComment #12
sushilck commentedComment #13
Rahul Seth commented@Smalution,
Module seems to be quite ok except in select_registration_roles.module file at line no. 102
$role_name = db_select('role', 'r')->fields('r', array('name'))->condition('rid', $select_roles)->execute()->fetchField();Instead of select_roles it should be role variable.
Comment #14
sushilck commentedThanks @Rahul,
I have updated the file.
Comment #15
sushilck commentedComment #16
sushilck commentedComment #17
sushilck commentedComment #18
chanderbhushan commented@Smalution thanks for contribute.
1. Use t() for title.
2. Alternatively add hook_help.
3. Add dependency of user Module.
Comment #19
sushilck commentedThanks @chanderbhushan,
Thanks for review.
Comment #20
sushilck commentedComment #21
tobias.streefkerk commentedHave you considered using hook_form_FORM_ID_alter instead of hook_form_alter? This saves you a few lines and is easier to read for other developers. hook_form_FORM_ID_alter is called before hook_form_alter so that would clear the way for future improvements and new functionalities.
No application blockers though.
Comment #22
jaapjansma commentedThe module looks ok. I was just wondering whether the same functionality could be implemented with Drupal Rules but I am not sure.
Comment #23
sushilck commentedI have implemented hook_form_FORM_ID_alter instead of hook_form_alter. @tobias.streefkerk thanks for your suggestion.
Comment #24
sushilck commentedDear @jaapjansma,
Thanks for reply.
Yes we can send email to any registered role through Drupal rule module and many more.
But we can not add role field in registration form and provide option to select role during registration through role module.
Comment #25
sushilck commentedComment #26
sushilck commentedComment #27
dalguete commentedNot a blocker but can make your life easier. Consider in function select_registration_roles_admin_settings_form and any other place where you have to extract roles info, to do so using user_roles(1) function, and just remove the unwanted entries (in your case, key 2). That turns unnecessary the next foreach.
Comment #28
sushilck commentedComment #29
sushilck commentedThanks @dalguete,
I have implemented user_roles() function. It will help me to reduce unnecessary lines.
Thank You.
Comment #30
arvind.kinjaHi,
Please change MENU_NORMAL_ITEM to MENU_LOCAL_ACTION under hook_menu. It will show link with symbol. Right now link is not showing under admin/people.
Regards
Arvind
Comment #31
sushilck commentedThanks @Arvind,
Updated.
Comment #32
cbuvaneswaran commentedAutomated Review
No issue http://pareview.sh/pareview/httpgitdrupalorgsandboxsushilck2630130git
Manual Review
README.txt/README.md
Yes: Follows Template
Coding style & Drupal API usage
variable_get()variables.Project page template
https://www.drupal.org/node/2190239. Please refer this link, your project page doesn't follow proper template and doesn't have project summary and etc. It's easy to understand once you follow the template properly.
Thanks.
Comment #33
chanderbhushan commentedRemoving review bonus tag, you have not done all manual reviews, you just posted the output of an automated review tool or made comments about git commands. Make sure to read through the source code of the other projects, as requested on the https://www.drupal.org/node/1975228review bonus page.
Comment #34
sushilck commentedRemoved all automated review comments from list.
Thanks chanderbhushan
Comment #35
sushilck commentedComment #36
adam_ commentedIndividual User Account?
No? It looks like this project has a company sponsor (in the README.txt). User name is the same as the company and the company is listed on the user account as well.
No duplication?
Looks similar to these modules:
https://www.drupal.org/project/autoassignrole
https://www.drupal.org/project/select_role
Master Branch?
Yes, default branch is set to 7.x-1.x
Licensing?
Licensing looks good.
3rd party assets/code?
I don’t see any 3rd party assets or code.
README.txt/README.md?
README.txt is present.
Code long/complex enough for review?
Yes, project is large enough and complex enough to review.
(+) Issue: I’m not going to mark as RBTC or ‘Needs Work’ because I’m not clear on the Individual User Account rules. On the review template the link to the standards lead to a page that was not clear on the issue. I believe the sponsor link in the README with a company name that matches your username is enough to seek clarification though.
I’ve sought out a second opinion here: https://groups.drupal.org/node/157669#comment-1141478
Comment #37
sushilck commentedDear @hook_awesome,
Individual User Account?
I have removed sponsor name as it create confusion but i have seen most of the contributed module page includes sponsor name.
How it difference from autoassignrole and select role
https://www.drupal.org/project/autoassignrole
In autoassignrole module,
There is no option to get notification email for some specific roles. In this module admin can set some specific roles for which he needs the notification.
In select_role module,
We get more difference between select_role and current modules.
Mainly there are two purpose of this module.
1. Add role field on registration page with some specific role(set by admin).
2. Admin will get notification email for some specific roles(set by admin).
Thanks
Comment #38
arkener commentedManual review
Line 42:
Throws the following notification:
Replace it with:
Line 65:
Replace the 2 by the constant DRUPAL_AUTHENTICATED_RID.
Line 78:
You might want to say which module here and maybe give a link to the configuration.
Line 88:
Wrap this in a t()
Line 118:
Use
drupal_get_messages('status', TRUE);instead of clearing the session.Line 123:
Also check for type here (===) as array search may return 0 which will be evaluated as FALSE. More information here.
Line 124:
This can be removed.
Line 134-136:
Do not send the mail to the user 1 account, send it to the sitewide email address or send it to a configurable email address. You're also using the preferred language of the registered user while you're sending the email to someone else. For more information, see how it's done here.
Line 147-149
Allow this to be translatable.
Line 150-159:
You might want to replace this by implode.
You should also add a .install file where you remove all your variables.
Comment #39
sushilck commentedHi Arkener,
Thanks for your review.
I have implemented the changes suggested by you.
Comment #40
sushilck commentedComment #41
dave bagler commentedREADME file:
The README file follow's the recommended template, and is relatively clear.
Change
Select Registration Roles module is for add role field in registration form.toThe Select Registration Roles module adds a role field on the registration form.Change
This module work with core user module.toThis module works with the core user module..Info file:
The convention seems to be to use hyphens rather than underscores in urls. It's also recommended by Google (https://support.google.com/webmasters/answer/76329). So I recommend changing
admin/people/select_registration_roles_setby_admintoadmin/people/select-registration-roles-setby-admin.Install file:
The install file looks good.
Module file:
Overall the module's code looks good.
In your menu hook update the configuration path to match what was suggested in my comment about the info file.
On line 78 there's a form field and the title is
You must configure <a href = "@configure">roles need for registration.</a>. I'm not sure what you mean by that.I wouldn't call it a blocker, but the grammar of various labels and messages to registering users and administrators could be improved. I'd be happy to help, but unfortunately I don't have the availability right now, but possibly next week.
Comment #42
dave bagler commentedComment #43
sushilck commentedHi @Dave,
Update the changes you have suggested.
Thanks for review.
Your suggestion is highly appreciated.
Thanks
Comment #44
sushilck commentedComment #45
pankajsachdeva commentedAutomated Review
No issue found.
Manual Review
Similar module which provides the same functionality but they are different in functionality:
Explain the functionality of module in detail
Comment #46
pankajsachdeva commentedComment #47
sushilck commentedHi pankaj,
Updated the README.txt file.
If anything need to improve on README.txt file.
Please suggest.
Q: If Admin approval required for all the new users, so why you use "Approval Roles" field ?
A: In case of admin approval required for all the new users. Admin need to select all the roles in "Approval Roles" field.But this module is mainly useful if admin wants to give approval permission to some particular roles. For all the new users admin approval admin can set "admin/config/people/accounts"(available functionality).
Thanks for reply.
Comment #48
sushilck commentedComment #49
pankajsachdeva commentedComment #50
avpadernoThank you for your contribution!
I updated your account so you can promote this to a full project and also create new projects as either a sandbox or a "full" project.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thank you, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks go also to the dedicated reviewer(s) as well.
Comment #52
chanderbhushan commentedComment #53
avpaderno