I'm trying to add a ctools custom content type to the user profile override provided by panels.

I have added a context, Logged-in user. I can access the values of this variable in my custom content type like this:


However, I also want to access the values for user-being-viewed, which is available in the user profile page by default. With the devel module, I can see the variables are in $context under argument_entity_id:user1, but I can't access them like this:


How can I access the variables of a context provided by default in Panels?

1 Answer 1


There might be a more elegant way, but here's what I came up with:

$user = reset($context);
$user = $user->data;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.