Temporary Suspension is a module that allows site users with the correct permissions to suspend users from the site, either indefinitely, or for a pre-determined amount of time. If the latter is selected, then the user will have their access reinstated on the given date via a cron job.
This module will eventually become part of a larger suite of modules to aid with user management.
Project page -> https://drupal.org/sandbox/adam_thomason/2158463
git clone --branch 6.x-1.x git.drupal.org:sandbox/adam_thomason/2158463.git
As far as I'm aware there are no modules that are not also part of a sandbox that currently share this functionality.
Modules I have reviewed manually:
https://drupal.org/node/2175825#comment-8384835
https://drupal.org/node/2172233#comment-8385253
https://drupal.org/node/2172033#comment-8385293
Thanks in advance,
Adam
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxadam_thomason2158463git
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 #2
adam_thomason commentedComment #3
adam_thomason commentedI have fixed all of the errors that were brought up by the robot, aside from one, which is a false-positive, and should not be changed.
I will complete some reviews myself and gain review bonus.
Comment #4
adam_thomason commentedComment #5
abhishek-anand commentedHi,
There are two issues found on http://pareview.sh/pareview/httpgitdrupalorgsandboxadamthomason2158463git
FILE: ...var/www/drupal-7-pareview/pareview_temp/includes/temp_suspend.admin.inc
--------------------------------------------------------------------------------
FOUND 0 ERROR(S) AND 2 WARNING(S) AFFECTING 2 LINE(S)
--------------------------------------------------------------------------------
98 | WARNING | Variable $converted is undefined.
105 | WARNING | Variable $converted is undefined.
Kindly fix them.
ALso @file comment is missing in hide_unused.js
Comment #6
abhishek-anand commentedComment #7
klausiMinor coding standard errors are not application blockers, please do a real manual review.
Comment #8
xqus commented* The CSS file in your Git repository is empty. Can it be removed? If you do, also remember not to load it in your code.
* temp_suspend_page(): Links should be created with: ll()
*temp_suspend_suspension_handler(): Messages passed to drupal_set_message() not translated. Should be drupal_set_message(t('f00'))
Comment #9
abhishek-anand commentedtemp_suspend_block_info() , temp_suspend_block_view():
hook_block_info() and hook_block_view() are not implemented in drupal6, kindly use hook_block() to create blocks.
Comment #10
andystone78 commentedHi Adam
A few other minor issues i noticed:
In temp_suspend_settings_form_validate() and temp_suspend_suspension_handler() could you use the constants TEMP_SUSPEND_FULL, TEMP_SUSPEND_TEMP & TEMP_SUSPEND_REVOKE rather than 0, 1 & 2 like you have in temp_suspend_settings_form(). This would make it easier to follow the conditional logic.
Definitely not a bug, but the suspension of a user is likely to be something that other module may wish to pick up on (maybe to send an email or notify some 3rd party service for example). It would be nice if a hook be triggered (via module_implements or similar) to allow this to happen (You could even have temp_suspend_suspension_handler() as an impliementation of that hook rather then being called explicitly).
Good luck with the module
Andy
Comment #11
auworks commentedHi Adam,
Great module mate...
Just did a manual review of your code and found some minor issues with it.
- LINE 50: $link = 'uid) . '">' . $user_name->user_name . '';
Wouldn't it be better if we use l($user_name->user_name, 'user/'.$user_name->uid); method instead of above?
- The module also requires CCK to work. Can you please include this in .info file.
- The module also allows you to suspend root user. Is this desirable?
Good luck...
Ash
Comment #12
anil614sagar commentedComment #13
adam_thomason commentedRelevant changes made above have been made.
Comment #14
adam_thomason commentedComment #15
adam_thomason commentedComment #16
adam_thomason commentedComment #17
adam_thomason commentedComment #18
adam_thomason commentedComment #19
xqus commentedIn temp_suspend_page(), you should use l() to create links.
Also see http://drupal.org/node/447604
Comment #20
adam_thomason commentedI have now appended the temp_suspend_page() function to use l() instead. I have now made all of the changed recommended by reviewers.
Thanks in advance,
Adam
Comment #21
adam_thomason commentedCould anybody else agree/disagree on RTBC?
Comment #22
buddaWith the above code as $date isn't used elsewhere in the function you could merge the two lines as:
Apart from that the module code inside looks good and the module works in Drupal 6. When's the Drupal 7 version due? :)
Comment #23
klausiRemoving review bonus tag, you have not done any manual review, you just posted the output of an automated review tool. Make sure to read through the source code of the other projects, as requested on the review bonus page.
When finishing your review comment also set the issue status either to "needs work" (you found some problems with the project) or "reviewed & tested by the community" (you found no major flaws).
Comment #24
adam_thomason commentedKlausi,
I'm still getting to grips with the review bonus stuff. My recommendations were done using manual review within PhpStorm with Php CodeSniffer enabled with Drupal selected as the standard, which brings up any coding standards errors, as well as general code errors. I did not simply copy the review tool, that wouldn't be constructive at all.
I have now fixed all of the errors which people have raised, with the exception of one variable definition warning, which is not a blocking issue.
If you could give some constructive criticism on what my next move should be, that would be fantastic.
Thanks in advance,
Adam
Comment #25
klausiIf you would like to further participate in the review bonus program just make sure to review a project in general; coding standards and branch naming are only one part which is covered pretty well by the automated review tools.
Does the project make sense? Is it a duplicate of an existing project? Are there suspicious parts in the code that could be security issues? Is it clear that the developer knows what she is doing and using Drupal as intended? Are the points of the review checklist ( https://drupal.org/node/1587704 ) covered? Then leave that outcome as feedback comment.
Comment #26
adam_thomason commentedAdding module review.
Comment #27
adam_thomason commentedAdding another module review towards review bonus.
Comment #28
adam_thomason commentedAdding final review to gain review bonus.
If somebody were to be so kind as to give my module a final check over, that would be much appreciated. I now believe the module is in line with D.O standards and is functional. I'm currently in the process of porting this module to 7.x too.
Thanks in advance,
Adam
Comment #29
adam_thomason commentedComment #30
jkswoods commentedHi Adam,
I have installed your module locally and can confirm that it works to your specification. From what I can see, there are no blocking errors in your code. Confirming RTBC.
Regards,
Fried Green Guatemalan
Comment #31
klausiReview of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
So although this will not scale on large sites and the block implementation is completely broken, the rest looks good.
Thanks for your contribution, adam_thomason!
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!
Thanks, 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 to the dedicated reviewer(s) as well.
Comment #32
adam_thomason commentedHi Klausi,
Thanks for all your help, I will take the points you raised in your last comment on board and fix them immediately. I appreciate you (and all others who were involved) taking the time to review my project and contribute ways in which I can develop my module into something which is maintainable, scalable and functional within any Drupal 6 installation.
Regards,
Adam