I'm trying to include a block in the content of the /user profile page. So far I found the documentation here (http://drupal.org/node/134433) showing how to limit the block to only users on their own profile page, but I'd like to add the filter arguments for:

&& (or (user has ubercart role expirations with 6 weeks or less)(user has no additional roles))

global $user;
if (arg(0) == 'user' && $user->uid == arg(1) && arg(2) == '' ){
  return TRUE;
}
else {
  return FALSE;
}

...posted in the block > visibility settings > pages > php option.

I'm a newbie to posting issues, working in php and some of the backend stuff for drupal so I apologize for any standards or posting errors, etc. If there are any questions about this request just let me know and I'll reply ASAP.

Comments

w01f’s picture

Project: 🍺 » Rules
Version: » 7.x-2.3
Component: Documentation » Module Integrations

Any ideas on this? Is this in the wrong place?

tr’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

I'm not sure why this is in the Rules issue queue - as far as I can tell you're not using Rules, you're just using the PHP module on the block visibility page. If you want to see how to access the expiration data from within PHP, look into the uc_roles.module, in the function uc_roles_user_view().