RE: [Phplib-users] Giancarlo Pinerolo (pingus) auth patch
Brought to you by:
nhruby,
richardarcher
|
From: Layne W. <la...@if...> - 2002-06-06 15:18:21
|
> The perm->check feature I have to fix, to return true/false instead of > showing perminvalid (which was absurd anyway, you'd want a > login/register form instead) You don't have to 'fix' anything. That's exactly what $perm->have_perm() does. $perm->check() is a shortcut to test and then show perminvalid if have_perm() failed. No, it isn't absurd. The login/register form should be there if no valid $auth is in place. The perminvalid makes perfect sense if the user is already logged in and does not have permission to access the page. I assume that each user has only one user account, so showing them a login/register form is a waste of time. It sounds like you need to tweak your perminvalid(). If there is a valid auth, then show them perminvalid, otherwise show them the login form. Layne Weathers Ifworld Inc. |