Answers.Body: <p>In case anyone needs this we ended up doing this with a simple drupal rule -</p>
  
  <p>Event = Content is viewed</p>
  
  <p>Conditions = AND user has role authenticated user, NOT user has role current member</p>
  
  <p>Action = Show a message "your membership has expired", repeat message = false</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-10T20:36:28.470Z
Answers.Text: thanks for posting this back - you should be able to Accept your own answer in a day or so.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-10T14:26:27.493Z
Answers.LastActivityDate: 2018-07-10T14:26:27.493Z
Answers.UserDisplayName: nigelwhite
Answers.Body: <p>Rather than using a Rule, you could achieve this just by using Views to create a block that shows Membership status, and if you want, limit it to only show for Roles that are expired, etc.</p>
  
  <p>I understand I am not answering the OP of 'how to do this via Rules' but am trying to answer a more generic question "how can i show a user their membership is expired"</p>
  
  <p>You may find a downloadable view that already does this in our <a href="https://www.fuzion.co.nz/treasure-trove" rel="nofollow noreferrer">Treasure Trove</a> eg <a href="https://www.fuzion.co.nz/blogs/showing-user-their-membership-status-using-views-block" rel="nofollow noreferrer">this one</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-14T18:53:51.633Z
Answers.LastActivityDate: 2017-10-14T18:53:51.633Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>We want to trigger a Drupal rule to display a message "Your membership has expired" when a user logs on.</p>
  
  <p>We have CiviMember Roles Sync set to "Synchronize whenever a user logs in or logs out. This action is performed only on the user logging in or out."</p>
  
  <p>It happily removes the role "Current Member" when the user logs in, but the user is not informed of this...... We have D7, CiviCRM 4.6.26, Drupal Rules module, civicrm_rules. I've messed about with many Rules settings, but can't get the rule to trigger on User login.</p>
  
  <p>Do you know what I'm missing? Thanks</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-14T18:55:16.870Z
Comments.Text: Noting that a more generic question would be 'how do i show a user their Membership is expired'
Comments.UserDisplayName: petednz - fuzion
Tags: <drupal><civimember><roles><drupal-rules>
Title: how to trigger a Drupal rule on CiviMember Roles Sync?
ThreadText: # how to trigger a Drupal rule on CiviMember Roles Sync?
  
  (Asked by: username_0 on 2017-10-14)
  
  We want to trigger a Drupal rule to display a message "Your membership has expired" when a user logs on.
  
  We have CiviMember Roles Sync set to "Synchronize whenever a user logs in or logs out. This action is performed only on the user logging in or out."
  
  It happily removes the role "Current Member" when the user logs in, but the user is not informed of this...... We have D7, CiviCRM 4.6.26, Drupal Rules module, civicrm\_rules. I've messed about with many Rules settings, but can't get the rule to trigger on User login.
  
  Do you know what I'm missing? Thanks
  
  **Tags:** drupal, civimember, roles, drupal-rules
  
  > **Comments:**
  > **username_1**: Noting that a more generic question would be 'how do i show a user their Membership is expired'  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2018-07-10. Score: 2
  
  In case anyone needs this we ended up doing this with a simple drupal rule -
  
  Event = Content is viewed
  
  Conditions = AND user has role authenticated user, NOT user has role current member
  
  Action = Show a message "your membership has expired", repeat message = false
  
  > **Comments:**
  > **username_1**: thanks for posting this back - you should be able to Accept your own answer in a day or so.  
  
  ---
  
  ### Answer by username_1 on 2017-10-14. Score: 1
  
  Rather than using a Rule, you could achieve this just by using Views to create a block that shows Membership status, and if you want, limit it to only show for Roles that are expired, etc.
  
  I understand I am not answering the OP of 'how to do this via Rules' but am trying to answer a more generic question "how can i show a user their membership is expired"
  
  You may find a downloadable view that already does this in our [Treasure Trove](https://www.fuzion.co.nz/treasure-trove) eg [this one](https://www.fuzion.co.nz/blogs/showing-user-their-membership-status-using-views-block)
  
  
  ---
  
  