On Tue, Feb 25, 2003 at 06:16:52PM -0500, [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to look up a user object via the mgd_get_person() function. The argument
> I'm supplying is the USERNAME of the user, not the numeric ID. I'm having trouble
> because my usernames are numeric in nature (e.g. username = "1000"). So, when I call
>
> $user = mgd_get_person( "1000");
>
> it returns NULL because it is trying to find the user number 1000 in the database,
> rather than the user NAMED 1000.
>
> How can I get around this problem?
Unfortunately, current mgd_get_person() implementation contains both id
and name check. So when argument to this function contains only digits, it
assumes that it is id (doesn't rely on type of argument).
So I don't know how you could work around this problem without rewriting
this function in midgard-php or fixing your person names - just add any
letter in name.
--
Regards,
Sergei Dolmatov.
---
USENET would be a better laboratory is there were more labor and less oratory.
-- Elizabeth Haley
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]