Date: 08/10/00
- Next message: INFO jpmnet.de: "[phplib] more than 31 permissions ?"
- Previous message: Michael D. Eschner: "[phplib] Templates"
- In reply to: Mikhail Avrekh: "[phplib] page_open() - weird behavior !!"
- Next in thread: Mikhail Avrekh: "Re: [phplib] page_open() - weird behavior !!"
- Reply: Mikhail Avrekh: "Re: [phplib] page_open() - weird behavior !!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Maybe I am missing something, but I don't understand why you are not doing
auth in the designed manor. This is what I believe you will need to do.
In local.inc sub class Auth. There is a method you will need to overwrite,
auth_validatelogin. This method will do the query you are trying to do
here:
> $auth = new DB_Sql;
> $auth->query("select * from table where pwd='$pwd' and id='$id'");
and then based on the result, you return either the user id or FALSE.
Now, you need to modify your page_open call to something like:
page_open(array("sess"=>"My_Session", "auth"=>"My_Auth"));
Another point to remember is Auth requires a session, so you need to create
the session first for auth to work. The good news is page_open takes care
of that for you.
-- Jesse Swensen swensenj <email protected>> From: Mikhail Avrekh <ami <email protected>> > Date: Mon, 7 Aug 2000 14:20:01 -0700 (PDT) > To: phplib <email protected> > Subject: [phplib] page_open() - weird behavior !! > > I already sent out an email about this last week, and I've done some more > digging around since then, so I hope that this time I can be more specific > about the problem and hopefully someone can help me out with this... > > Here's the script: > > <? > $count = 0; > $auth = new DB_Sql; > $auth->query("select * from table where pwd='$pwd' and id='$id'"); > > $count=1; > if ($auth->next_record()) { > $count=2; > page_open(array("sess"=>"My_Session")); > $sess->register("id"); > page_close(); > print $count; > } else { > print "Your password is not in the database"; > exit; > } > > ?>
--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: INFO jpmnet.de: "[phplib] more than 31 permissions ?"
- Previous message: Michael D. Eschner: "[phplib] Templates"
- In reply to: Mikhail Avrekh: "[phplib] page_open() - weird behavior !!"
- Next in thread: Mikhail Avrekh: "Re: [phplib] page_open() - weird behavior !!"
- Reply: Mikhail Avrekh: "Re: [phplib] page_open() - weird behavior !!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

