Re: [Phpslash-devel] Dumb auth question
Brought to you by:
joestewart,
nhruby
From: nathan r. h. <na...@ds...> - 2003-04-02 22:10:11
|
On Wed, 2 Apr 2003, Joe Stewart wrote: > On Wed, Apr 02, 2003 at 01:19:28PM -0800, nathan r. hruby wrote: > > > > I think this is me being dyslexic. IIRC, in phplib $auth->nobody was a > > boolean shorthand to determine if the current $auth object is > > authenticated as a user, or if we're operating as a default user and > > looking through the auth.inc class seems to beack this up. this may have > > chnaged recently, at this point Joe, youd know better than I. > > > > It is a boolean to set if nobody access is allowed. > > false or unset - login is required. > true - public access is allowed. > Hurm.. I will go back and re-read auth class - somthing isn't jiving in my head but that makes sense. > > So the correct method for determinig the user is still to check > > $auth->['uid'] == 'nobody' > > Well it would have worked before :) > > Now the uid of nobody is changed to that of the phpSlash nobody user. > This is done to have a easy method to control the name and access of > the public user. > Ah.. that does make sense. > The way we're checking for login status in phpSlash is if they have > the "user" permission. > > perm->have_perm("user") > Wondered why we were doing this. Ok. > > > I though phplib did away with this a longtime > > ago (maybe now we're supposed to check $auth->['username']?) > > > > no. > You're so mean to me ;) > If it helps - > > There are a couple of methods in Author.class that can get author info > from the uid. > > getName, getRealName and getAuthor > Do we want to say that these are reccommended methods of getting this data, and just ignore $auth? altogether or is it still preferred to just get what you need from $auth->{name,dname,emailfoo} > > Again, me being kinda stupid. > > > > nope. It's about three things happening right together. > Hey! You got permissions in my auth class! Hey! You got auth in my permissions class! Heeeey! -n -- ------ nathan hruby na...@ds... ------ |