Hi..

As we know at the time of "Cancel user accounts", we have four options in drupal core that are following.

1. Disable the account and keep its content.
2. Disable the account and unpublish its content.
3. Delete the account and make its content belong to the Anonymous user.
4. Delete the account and its content.

This module has a feature to add one more option, to assign the content to admin while cancelling to selected users.

New option is:

"Delete the account and make its content belong to the administrator."

Project Link: https://www.drupal.org/sandbox/jaipal/2408333

Git clone command:

git clone --branch 7.x-1.x jaipal@git.drupal.org:sandbox/jaipal/2408333.git usercancel_contentassigntoadmin

Pareview:
http://pareview.sh/pareview/httpgitdrupalorgsandboxjaipal2408333git

Reviews of other projects:
https://www.drupal.org/node/2408539#comment-9537081
https://www.drupal.org/node/2423697#comment-9631383
https://www.drupal.org/node/2415601#comment-9631803

We needs to apply a patch with this module. The patch is avaliable with project.
I am attaching with same also.

Files: 
CommentFileSizeAuthor
UserCancelDefault-2411351-1.patch508 bytesjaipal

Comments

nesta_’s picture

Status: Needs review » Needs work

Change git command to: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/jaipal/2408333.git
:)

nesta_’s picture

Fix http://pareview.sh/pareview/httpgitdrupalorgsandboxjaipal2408333git

Automated:

Git default branch is not set, see the documentation on setting a default branch.
Review of the 7.x-1.x branch (commit baec06f):

Remove "version" from the ./usercancel_contentassigntoadmin.info file, it will be added by drupal.org packaging automatically.
DrupalPractice has found some issues with your code, but could be false positives.
FILE: .../drupal-7-pareview/pareview_temp/usercancel_contentassigntoadmin.module
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
21 | WARNING | Unused global variable $user.
--------------------------------------------------------------------------------

polaki_viswanath’s picture

Hi Jaipal

The module works fine. Only thing is "authored on" field getting changed when user who created the node is deleted. It might not be required since authored on field is used in many areas.

Thanks

jaipal’s picture

Hi nguerrero

First of all thanks for review the module.

1. Now Git default branch is set.
2. Unused global variable "$user" has been removed.
3. Version information has been removed from info file.

Thanks.

jaipal’s picture

#3, Thanks for the comment Polaki, I am not able to reproduce the issue. So could you please review and send me feedback again?

jaipal’s picture

Status: Needs work » Needs review
PA robot’s picture

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.

naveenvalecha’s picture

Assigned: Unassigned » naveenvalecha

Assigning to myself for next review, that may be happened tonight.

jaipal’s picture

#8 Thanks Naveen. Please let me know for you feedback.

naveenvalecha’s picture

Assigned: naveenvalecha » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: +PAReview: Single project promote

First Thanks for your contribution! and helping in reviewing other project applications.

Automated Review

Best practice issues identified by pareview.sh / drupalcs / coder.

Review of the 7.x-1.x branch (commit 2d43990):

  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.
  • /Applications/MAMP/htdocs/d7.dev/sites/all/modules/sandbox/usercancel_contentassigntoadmin/usercancel_contentassigntoadmin.module:4:1: error - The second line in the file doc comment must be " * @file"
    /Applications/MAMP/htdocs/d7.dev/sites/all/modules/sandbox/usercancel_contentassigntoadmin/usercancel_contentassigntoadmin.module:5:1: error - The third line in the file doc comment must contain a description and must not be indented

Manual Review

Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
No: Follows the guidelines for in-project documentation and/or the README Template.Currently Readme has all the needed information.Please make use of Readme Template.
Code long/complex enough for review
No: Follows the guidelines for project length and complexity.The module has only 2 functions.So Added the single promote tag.We can integrate this with some existing contrib module but not found the right contrib module for the same.
Secure code
Yes: Meets the security requirements.
Coding style & Drupal API usage
  1. hook_help() is missing in this module.
  2. The organization I worked with we never use the user 1 account.We usually create Super admin Role separately and block the user 1 account.So please specify on the project page that on the deletion of the account, its content will be belonged to user 1 Admin account.
  3. (+) Please add more information on your project page.

The starred items (*) are fairly big issues and warrant going back to Needs Work. Items marked with a plus sign (+) are important and should be addressed before a stable project release. The rest of the comments in the code walkthrough are recommendations.

If added, please don't remove the security tag, we keep that for statistics and to show examples of security problems.

This review uses the Project Application Review Template.

Not found any blocker.So setting this to RTBC :)

klausi’s picture

Removing review bonus tag, no review comments listed in the issue summary? Make sure to read through the source code of the other projects, as requested on the review bonus page.

jaipal’s picture

Issue summary: View changes
jaipal’s picture

#10 Thanks for review Naveen.

1. hook_help() has been added.

2. As per you feedback, I have implemented the feature to select an admin user to assign content while cancelling to selected users. Please review it.

3. More information has been added on project page.

Let me know your feedback.

Thanks again :)

jaipal’s picture

Issue summary: View changes
jaipal’s picture

Issue summary: View changes
jaipal’s picture

Issue summary: View changes
jaipal’s picture

Issue tags: +PAReview: review bonus

Adding the new tag..

klausi’s picture

Status: Reviewed & tested by the community » Fixed

Thank you for your reiews. 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).

Review of the 7.x-1.x branch (commit 097a5c0):

  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards).
    FILE: /home/klausi/pareview_temp/usercancel_contentassigntoadmin.js
    ----------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------
     9 | ERROR | [x] Expected newline after closing brace
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
  • No automated test cases were found, did you consider writing Simpletests or PHPUnit tests? This is not a requirement but encouraged for professional software development.

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:

  1. usercancel_contentassigntoadmin.js: use Drupal.behaviors instead of jQuery(document).ready(), see https://www.drupal.org/node/756722 and https://www.lullabot.com/blog/article/understanding-javascript-behaviors...
  2. Is the core patch mentioned on the project page still needed? The README does not list it?
  3. usercancel_contentassigntoadmin_form_user_multiple_cancel_confirm_alter(): doc block is wrong, this is hook_form_FORM_ID_alter().
  4. usercancel_contentassigntoadmin_get_admin_user_list(): this function hardcodes rid 3 as the super admin role, which could be a different role ID on a site that uses role_export for example. You should use variable_get('user_admin_role', 0) to determine the super admin role ID.

But that are not critical application blockers, so ...

Thanks for your contribution, jaipal!

I promoted this project for you: https://www.drupal.org/project/usercancel_contentassigntoadmin

Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.

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.

Status: Fixed » Closed (fixed)

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