[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Users, authentication, the objects, and PHP



> After trying to get useredit.php3 updated, I was referring to the
> $current_user object which doesn't seem to exist anywhere but your
> examples... :-)

That is correct.

> I assume I need to write the code to create it and put it in
> functions.php3.

Not really.  All the code has already been written.  Just code as if it
existed if you can.  Monday/Tuesday is when it will exist.  $current_user
will be setup for every page load just like $current_object is.
Render.php3 will handle creating the $current_user object, so everyone's
pages can just refer to it as normal.

Is that in any way clear?  :)

The only reason render.php3 isn't currenlty setting up $current_user for
everyone is because $current_user->has_access() has not yet been
implimented.  I guess I could have render.php3 set it up anyway... you
just wouldn't have that function... don't know why I didn't.  Oh well, I
will do it by Monday/Tuesday as I said.  If you can wait til then and just
code your script as if it existed, cool... or if you need it there for
testing, just make the following hack to render.php3 (AFTER the object
init stuff, but before the include of the renderfile):

$current_user = fetch_object($USER_OBJECT_ID); /* Obviously, replace the
variable with the user ID you wanna test with.  By Tuesday I'll hack it
properly so that it will determine that user ID via the apache headers...
*/

> Apache's HTTP authentication, it somehow blocks the auth info from PHP. 
> Does anyone know a way around that?  If not, we'll need to code all
> authentication in PHP (not particularly difficult, but might interfere
> with Aaron's perl stuff).

We will be disabling the Perl stuff and having PHP do all authentication.
Again, render.php3 will determine when auth is necisary, perform it, and
make $current_user available to all other pages.

> Will you be on IRC much tomorrow?  This might be the last real hurdle. 
> Just seems like every time I try to get something done on this (and this
> has happened several times), I run into a brick wall 15 minutes into
> it.  Not too good.... :-(

Unfortunately no... as I stated in my last email, my free time doesn't
start til Monday, but when it starts, I'll be getting 10 - 14 hrs a day
into it... so expect a LOT to get done on my part.

Bu please let me know if the above provided any insight so that you might
continue development.  It should have.  If you make that hack, you can at
least test.  Just pretend it's been authenticated, etc.  Cuz thats what
I'm tackling first with all my time to work on LKB approaching...

-- 
Jason
Linux Knowledge Base Project Leader, http://www.linuxkb.org
http://vodka.linuxkb.org/~chardros