Is it possible to have all Subcriptions Info not show up on the My Account view screen for roles that don't have permissions to even setup subscriptions? It's confusing for users to see Subscription Info for services they can't subscribe to or don't even have to subscribe to. Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lyricnz’s picture

Try attached patch. See http://drupal.org/node/60108 (how to apply patches). You could do similar for donations, paid adverts etc. I wouldn't apply this patch to CVS without making the behavior optional, which I don't have time to do right now.

rmassamiri’s picture

Thanks for the patch. I probably didn't do this right, but I tried following your instructions and here is what I did and received the following...

.../lm_paypal$ patch -p3 --dry-run < lm_paypal-hidesubscriptions.patch
missing header for unified diff at line 10 of patch
can't find file to patch at input line 10
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|? lm_paypal-plurals.patch
|? lm_paypal.test
|Index: lm_paypal_subscriptions.module
|===================================================================
|RCS file: /cvs/drupal-contrib/contributions/modules/lm_paypal/lm_paypal_subscriptions.module,v
|retrieving revision 1.33.4.15
|diff -u -r1.33.4.15 lm_paypal_subscriptions.module
|--- lm_paypal_subscriptions.module 6 Nov 2008 20:37:35 -0000 1.33.4.15
|+++ lm_paypal_subscriptions.module 8 Nov 2008 00:19:59 -0000
--------------------------
File to patch: lm_paypal-hidesubscriptions.patch
patching file lm_paypal-hidesubscriptions.patch
Hunk #1 FAILED at 2279.
1 out of 1 hunk FAILED -- saving rejects to file lm_paypal-hidesubscriptions.patch.rem

lyricnz’s picture

Use "patch -p0" (from the lm_paypal directory). The example I posted in another issue was for a slightly malformed patch created from a different directory.

rmassamiri’s picture

Great. Thanks. That worked.

marcoBauli’s picture

Status: Active » Reviewed & tested by the community
FileSize
571 bytes

totally agree on this ;)

attached is the patch for 5.x too. thank you

Marc Angles’s picture

This patch seems to break the cache rebuild of the menu.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () dans /srv/aegir/drupal-6.14-1.0-prod/modules/user/user.module à la ligne 502.

John Franklin’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)
FileSize
858 bytes

Applied to 6.x-1.x and 6.x-2.x. Patch for 7.x-1.x attached for review.

fehin’s picture

Can we also have this on a separate page or block instead of only on the user profile page? Some of us override the profile page with panel. I opened an issue about it here http://drupal.org/node/1551010.