Would it be possible to display the user picture in the results if user pictures are enabled on the site?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

PascalAnimateur’s picture

Looks like it is possible !

PascalAnimateur’s picture

Even better patch with email display and translation of the entity label.

There should be corresponding options for (picture / email) in the user search plugin settings.

anon’s picture

Yes, this could be a feature.

I have some comments about the patch tho.

- Why use t() on the description? The reason why its not there now is that the description is "user input". Check https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/t/7

- There should be a setting for this in the "User plugin settings" that is default off.

- The typo fix can still be in the patch, I don't mind that.

If you fix this, I'll gladly commit this.

Northern_Girl’s picture

Hi.

Was this finally commited ? I'm a new user to Linkit and this is something that I would like to have.

Thanks.

PascalAnimateur’s picture

Here's a revised patch with only the user image display, no t() in the description.

PascalAnimateur’s picture

Status: Active » Needs review
PascalAnimateur’s picture

anon’s picture

Status: Needs review » Needs work

Well, it sure fixes the two issues, but it reintroduce a security issue.

We need to sanitize the output. That is done by Drupal.checkPlain(result.description) today. If we remote that, it open for XSS attacks.

PascalAnimateur’s picture

Version: 7.x-3.x-dev » 7.x-3.5
Status: Needs work » Needs review
FileSize
1.31 KB

Re-rolled patch against 7.x-3.5

anon’s picture

Status: Needs review » Needs work

I would like to see this configurable in the user plugin.

mark_fullmer’s picture

Status: Needs work » Closed (won't fix)

In order to help the community and the module maintainers focus work on the issues for this module that are most important to the Drupal community, I'm going to close this issue, as it is a feature request that does not have substantial work already and the issue hasn't been updated in many years.