This has come up repeatedly on the Civi Forums and in this case International Mountain Biking Association needed one for Drupal 6, so I thought I would quickly share a Drupal 6 and Drupal 7 solution as a starting point for others.
The block is built from a View based on 'memberships' and links the Membership to the Civi Contact and then to the Drupal User, which is then limited to being the 'current user'. For non-members you can use the 'no result' option to provide them a link to JOIN - and then if you want this showing only on the User page, set the block to show only at user and user/*
NB to import a View in D7 you either need to be user/1 or to Masquerade as admin.
Attachment | Size |
---|---|
Drupal 6 Views block showing current user their Membership info | 4.54 KB |
Drupal 7 Views block showing current user their Membership info | 24.64 KB |