Attached is a .inc file to add user signature to the user context.


Comments attachment.

new1.25 KB


Status:Active» Needs work

THis should've been marked 'needs review' -- it would've been seen more quickly.

  if ($account === FALSE || ($account->access == 0 && !user_access('administer users'))) {
    return drupal_not_found();

This is completely wrong in a content type. The whole page should not disappear just because one content type can't be viewed. It should just return NULL.

* Callback function to supply a list of content types.
function ctools_user_signature_ctools_content_types() {
  return array(
    'single' => TRUE,
    'title' => t('User signature'),
    'icon' => 'icon_user.png',
    'description' => t('The signature of a user.'),
    'required context' => new ctools_context_required(t('User'), 'user'),
    'category' => t('User'),

This should be using the $plugin = array() notation.

'single' => TRUE is now the default.

Version:6.x-1.2» 6.x-1.7
new1.16 KB

Here is the file with the desired changes.

  if ($account === FALSE || ($account->access == 0 && !user_access('administer users'))) {
    return drupal_not_found();

This was modeled on, but I changed it to return NULL.

Thanks for the review.

Status:Needs work» Needs review

Changing to needs review.

Status:Needs review» Fixed

Thanks for the reroll. Looks good now, so committed.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.