Project link: https://drupal.org/sandbox/draenen/1875930
Git: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/draenen/1875930.git membership_entity

Membership entity provides a new entity for managing online memberships. Membership can contain fields separate from user accounts and multiple users can belong to a single memberships (eg. primary and secondary members).

This module is a response to several membership based websites that have been developed at Monarch Digital including:
* The Mercedes-Benz Club of America - http://www.mbca.org
* The Porsche Club of America - http://www.pca.org (new Drupal 7 site to be released later this month)
* The North American Rock Garden Society - http://www.nargs.org

The module assigns and removes member roles automatically but differs from other membership modules primarily in the ability to attach multiple users to a single membership.

The module is ready for and would benefit from an alpha release. Outstanding work before a full release include
* Better integration with views, rules, and tokens
* Thorough documentation
* Automated tests

None of these would prevent the module from being usable in it's current state.

Reviews of other projects
---------------------------------
https://drupal.org/comment/8495831#comment-8495831
https://drupal.org/comment/8495379#comment-8495379
https://drupal.org/comment/8495235#comment-8495235
https://drupal.org/comment/8495423#comment-8495423

Additional reviews of other projects
---------------------------------------------
https://drupal.org/comment/8565431#comment-8565431
https://drupal.org/comment/8565361#comment-8565361
https://drupal.org/comment/8565489#comment-8565489

Comments

draenen’s picture

Issue summary: View changes
PA robot’s picture

Issue summary: View changes

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.

alinouman’s picture

Issue summary: View changes
Status: Needs review » Needs work

did u check this http://pareview.sh/pareview/httpgitdrupalorgsandboxdraenen1875930git?
please correct these issues thanks
It appears you are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
The following git branches do not match the release branch pattern, you should remove/rename them. See http://drupal.org/node/1015226

remotes/origin/7.x-1.x-dev

Review of the master branch:

README.txt or README.md is missing, see the guidelines for in-project documentation.
Coder Sniffer has found some issues with your code (please check the Drupal coding standards).

FILE: /var/www/drupal-7-pareview/pareview_temp/memberships.info
--------------------------------------------------------------------------------
FOUND 2 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
1 | ERROR | "description" property is missing in the info file
1 | ERROR | "core" property is missing in the info file
--------------------------------------------------------------------------------

draenen’s picture

Status: Needs work » Needs review
draenen’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus

Added project reviews for review bonus.

Rkumar’s picture

Please correct these issues-

membership_entity.devel.inc
Line 203: Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs) [security_3]
drupal_set_message(t('!num generated.', array(

membership_entity.pages.inc
Line 489: Potential problem: FAPI elements '#title' and '#description' only accept filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized. (Drupal Docs) [security_fapi_title]
'#title' => $filter['title'],

Line 944: Potential problem: confirm_form() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs) [security_7]
return confirm_form($form, t('Are you sure you want to delete this membership?'), 'membership/' . $membership->mid, t('This action cannot be undone.'), t('Delete'), t('Cancel'));

Best wishes with the code work.
Rkumar

Rkumar’s picture

Status: Needs review » Needs work

Refer #6

draenen’s picture

Status: Needs work » Needs review

Thanks for the review!

membership_entity.devel.inc:203
!num is generated by format_plural() which sanitizes input. !placeholder is necessary here to prevent duplicate sensitization.

membership_entity.pages.inc:489
$filter['title'] is already sanitized by membership_entity_filters().

membership_entity.pages.inc:944
We're not using any !placeholders and all text is sanitized by t().

See https://drupal.org/node/2201367.

hayashi’s picture

Status: Needs review » Needs work

Hi @draenen

Nice module and very clean code.
I found some issues. Please confirm below.

  1. 'Join' link in 'User menu' does not appears.
  2. Member ID length can be set to over 255, database error occured when create membership.
draenen’s picture

Status: Needs work » Needs review

Thanks for the review! Good catches. These items are now fixed.

https://drupal.org/node/2205173
https://drupal.org/node/2205175

klausi’s picture

Assigned: Unassigned » cweagans
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus

Review of the 7.x-1.x branch:

  • ./membership_entity.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming
    function form_type_membership_entity_member_select_value($element, $input, &$form_state) {
    
  • Codespell has found some spelling errors in your code.
    ./modules/membership_entity_term/membership_entity_term.module:479: liftime  ==> lifetime
    

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. You can ignore the coding standard errors on the Views classes, but you should fix the data types for @param documentation. Example: "@param $js" should be "@param string $js". See https://drupal.org/node/1354#param
  2. membership_entity_schema(): schma column descriptions should not run through t(), since that is not user facing text and only creates overhead for translators.
  3. membership_entity_permission(): why the module_exists() call here? The submodule should implement hook_permission() itself.
  4. "module_invoke_all('membership_entity_access',...": Hooks that are provided by a module should be documented in MODULENAME.api.php, see http://drupal.org/node/161085#api_php
  5. membership_entity_membership_entity_access(): variable $type join is undefined?
  6. form_type_membership_entity_member_select_value(): that function is never used, or am I missing something?
  7. membership_entity_form_validate(): the check_plain() in the db_select() is wrong here, you are not printing that to the user? Make sure to read https://drupal.org/node/28984 again.
  8. membership_entity_uid_value(): Do not use db_select() for simple static queries, use db_query() instead. See http://drupal.org/node/310075

But otherwise looks RTBC to me. Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

Assigning to cweagans as he might have time to take a final look at this.

draenen’s picture

Thanks for the review! These items are fixed with the following exceptions.

3. membership_entity_permission() uses !module_exists() to add bundle permissions for the default bundle if membership_entity_type is not enabled. If membership_entity_type is enabled it will take over management (including permissions) of all membership_entity bundles.

6. form_type_membership_entity_member_select_value() follows the default naming convention for form element value callbacks. See section "Value callback or form_type_hook_value()" at https://drupal.org/node/169815

draenen’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus

Adding additional module reviews for the review bonus.

klausi’s picture

Status: Reviewed & tested by the community » Fixed

no objections for more than a week, so ...

Thanks for your contribution, draenen!

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.

Status: Fixed » Closed (fixed)

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