Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
<?Global $user; if ($user->uid < 1){ drupal_goto ($path='node/XXX');// Your SORRY pageexit();} elseif ($user->uid >= 1);{ $userID = crm_uf_get_match_id($user->uid);}$query = "SELECT * FROM civicrm_membership WHERE contact_id = $userID"; $result2 = mysql_query ($query) or die ("Died");$field2 = mysql_fetch_object($result2);if ( $field2->status_id == 1 ) { // 1 is new memberprint (What you want it to print);}elseif ( $field2->status_id == 2 ) {// 2 is current memberprint (What you want it to print);}elseif ( $field2->status_id == 3 ) {// 3 is grace period member, 4 is lapsed memberprint (What you want it to print);}else { drupal_goto ($path='node/XXX');// Your SORRY pageexit();}?>