Posted by barrya on August 23, 2010 at 12:35am
2 followers
Jump to:
| Project: | User Points Contributed modules |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
I wanted it so that my default setting for userpoints is moderated, however when a user registers these points are automatically approved.
I've attached a patch that adds a configuration option allowing you to select whether points assigned on registration should be moderated or approved, overriding the default setting if need be.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| patch.txt | 3.63 KB | Ignored: Check issue status. | None | None |
Comments
#1
+++ userpoints_register/userpoints_register.module 23 Aug 2010 00:31:28 -0000@@ -36,10 +38,24 @@
+ '#description' => t('If disabled, UserPoints will hide informational message about the points during registering. Useful for situations, where username is not fully available, such as when using Content Profile module.'),
I think at least the second sentence of the description is not necessary.
+++ userpoints_register/userpoints_register.module 23 Aug 2010 00:31:28 -0000@@ -36,10 +38,24 @@
+ $form[$group][USERPOINTS_REGISTER_MODERATION] = array(
+ '#type' => 'radios',
+ '#title' => t('Moderation'),
+ '#default_value' => variable_get(USERPOINTS_REGISTER_MODERATION, 0),
+ '#options' => array( 0 => t('No'), 1 => t('Yes') ),
+ '#description' => t('Points for registration can be moderated if moderation is set to "Yes".'),
+ );
I think there should be three values. Yes/No/Use Default. Because using either Yes or No will override the default. Same for display.
+++ userpoints_register/userpoints_register.module 23 Aug 2010 00:31:28 -0000@@ -49,18 +65,18 @@
+ // Award the points - implementation of hook_userpointsapi()
Since you move it around anyway, please add a period at the end of the comment.
Powered by Dreditor.