I was looking for this functionality so I wrote a plugin for it. This takes %username as an argument (also replaces %uid). Just change the extension to .inc and place it in the ctools plugin folder. So far it worked fine for me, but this is my first contrib so handle with care :) . Cheers!

CommentFileSizeAuthor
username.txt1.64 KBblup

Comments

merlinofchaos’s picture

Status: Active » Needs review

Quick review: This looks pretty good except I believe you can user_load('name' => $name) directly without the extra query.

Also, 'needs review' is the proper state for these. They'll get better attended.

sdboyer’s picture

Echo merlin's comment, and also - why allow username OR uid? It's kinda splitting hairs, but it strikes me as a kind of 'hidden'/succeed silently behavior that can cause confusion in the long run, especially if we ever change the plugin to behave more strictly in accordance with its placeholder. I'd rather have one plugin that does just username, and another that allows both and says it.

Also, if it's not too much trouble to reroll using an actual patchfile for the two files, I'd appreciate it.

merlinofchaos’s picture

Oh yes, I agree with sdboyer -- it should do just usernames, not uids at all.

merlinofchaos’s picture

Status: Needs review » Fixed

Committed, with some changes, like sdboyer and I mentioned.

Status: Fixed » Closed (fixed)

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