[Bug 6385] passing a non-existent uid to xarUserGetVar results in a system error, stopping page rendering

[email protected]
Newsgroups gmane.comp.cms.xaraya.bugs
Message-ID <[email protected]>
http://bugs.xaraya.com/show_bug.cgi?id=6385





------- Comment #3 from crispcreations-gM/[email protected]  2009-06-17 16:45 GMT -------
(In reply to comment #2)
> (In reply to comment #1)
> >... A template can use xarUserGetVar() to check whether the user exists
> 
> I was confusing the original bug report with xarUserModVar(). Since 'name' for
> xarUserGetVar() should always exist, then a NULL would signify the user does
> not exist (at least so far as the current user is concerned) without any
> further checks.
> 
Looking at the xarUserGetVar() function it appears to return mixed output
anyway, in some instances throwing an exception (trying to get a password
param, or passing an invalid user id), and in others it returns a string (user
is last resort, or anonymous). Perhaps passing a string of 'Unknown Id' would
be acceptable for an unknown user. Maybe we could limit it to fieldname, so
only a request for a users 'name' or 'uname' returns the string, and any other
params throw the exception? 


-- 
Configure bugmail: http://bugs.xaraya.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

---- ** IMPORTANT ** READ BELOW ** ----
[Clip Me Start]
--------------------------------------------------------------------------
If you wish, you can reply to this message directly **however**, make sure
to use the "Reply To All" feature of your client **and** ensure that the 
bug specifier is in the subject (ie: [Bug ####]). Also, you _MUST_ have 
you're From or Reply-To address set to the same address you use to log
into your bugzilla account or your reply will not be attached to the bug.
--------------------------------------------------------------------------
[Clip Me End]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.