Here's a simple content type plugin that provide user links for a comment. It's almost a straight copy of node_links.inc.

I know that links for users is not a standard concept, but a few modules provide them for all entities in a generic fashion. One example is Flag module.

So, IMO this would be a useful addition.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dixon_’s picture

Michelle’s picture

Issue summary: View changes
FileSize
2.53 KB

This gives me the following error:

"Notice: Undefined index: links in ctools_user_links_content_type_render() (line 42 of /var/www/html/drupal-contrib/sites/all/modules/ctools/plugins/content_types/user_context/user_links.inc)."

The line is:

$block->content = $account->content['links'];

You say, "I know that links for users is not a standard concept". Does that mean these links are not part of core? If so, then I guess the fix would be to check if that array element is there before trying to use it. I took a stab at a patch that gets rid of the error and simply returns nothing if there are no links.

japerry’s picture

Status: Needs review » Needs work

Marking needs work based on comment #3.

japerry’s picture

Status: Needs work » Fixed
Issue tags: +SprintWeekend2015

Thanks dmckenna for taking notice that I was talking about patch 0 and not patch 3. After trying that one, feature looks good.

Fixed!

  • japerry committed d33ee67 on 7.x-1.x authored by Michelle
    Issue #2062603 by dixon_, Michelle: Provide user links content type...

Status: Fixed » Closed (fixed)

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