CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • TIP: Views block to show logged in Users Member/Contact info
Pages: [1]

Author Topic: TIP: Views block to show logged in Users Member/Contact info  (Read 2165 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
TIP: Views block to show logged in Users Member/Contact info
October 23, 2011, 10:22:55 pm
Thought this might save someone else some time. A simple View with a Page and a Block.
The Block has the following Contextual Filter so that who ever is logged in will see a block with their Name, MemberType, Status and End Date.
Filter = User UID
When Filter Value is Not Available = Provide Default Value = User ID from logged in user
You can add other fields.
There is also a page set without the Contextual Filter so that you can see the data that is going to be displayed for all users.
You may need to set the block to only show for a particular role eg Authorised, and/or configure it for 'no results'
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Traveler777

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.2
Re: TIP: Views block to show logged in Users Member/Contact info
November 22, 2011, 09:28:39 am
How right you were thinking that someone else might be in your same situation.

Unfortunately, I am not sure which View Type to choose. I am asking because when choosing the "Node Type" I didn't find the CiviCRM fields. For the "User Type" as well and for the "CiviCRM Contact Type" I didn't see the User UID.

Thanks for clarifying and enlightening me.

Cheers

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: TIP: Views block to show logged in Users Member/Contact info
November 22, 2011, 09:34:01 am
T - not clear - I thought I had attached the view - so all you need do is copy it and 'import view' and the rest should just happen - ie you don't need to decide what View type.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Traveler777

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.2
Re: TIP: Views block to show logged in Users Member/Contact info
November 22, 2011, 10:45:34 am
Ahh. Didn't see the attachment. Unfortunately, still running views 2. Any hint how to approach it manually?

Traveler777

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 0
  • CiviCRM version: 3.3.2
  • CMS version: Drupal 6.2
Re: TIP: Views block to show logged in Users Member/Contact info
November 22, 2011, 10:55:28 am
Think I got it. Changed the code to core = 6 and api to 2.0. Imported it and got one error, but might be able to square this away. Data shows correctly so far for logged in user.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: TIP: Views block to show logged in Users Member/Contact info
November 22, 2011, 11:03:01 pm
cool - well done - post it back here when you have it running sweetly so others can utilise it - thanks
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

drupleg

  • I post occasionally
  • **
  • Posts: 39
  • Karma: 2
    • Drupal.org Profile
  • CiviCRM version: 4.1
  • CMS version: Drupal 7
  • PHP version: 5.3
Re: TIP: Views block to show logged in Users Member/Contact info
November 15, 2012, 09:11:35 am
EFFIN' BRILLIANT! THANK YOU PETER FOR SHARING THIS.... sorry for the call caps, but you just saved me so much time and I really really appreciate it! Thanks! :)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: TIP: Views block to show logged in Users Member/Contact info
November 15, 2012, 10:41:03 am
You're very welcome - and those types of CAPS are entirely fine  ;D
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

kidwellj

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.2
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 4
Re: TIP: Views block to show logged in Users Member/Contact info
March 11, 2014, 05:36:36 am
Just saved me hours of work - many thanks for this!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: TIP: Views block to show logged in Users Member/Contact info
March 11, 2014, 01:58:29 pm
hi kidwellj - glad such things can be so much of a time saver for others
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • TIP: Views block to show logged in Users Member/Contact info

This forum was archived on 2017-11-26.