Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
6.x-1.0-rc1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2009 at 05:06 UTC
Updated:
15 Oct 2009 at 22:50 UTC
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!
| Comment | File | Size | Author |
|---|---|---|---|
| username.txt | 1.64 KB | blup |
Comments
Comment #1
merlinofchaos commentedQuick 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.
Comment #2
sdboyer commentedEcho 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.
Comment #3
merlinofchaos commentedOh yes, I agree with sdboyer -- it should do just usernames, not uids at all.
Comment #4
merlinofchaos commentedCommitted, with some changes, like sdboyer and I mentioned.