Date: 03/09/00
- Next message: Kirill Maximov: "Re: [PHPLIB-DEV] [sitnikov <email protected>: PHPLib bug]"
- Previous message: Sascha Schumann: "[PHPLIB-DEV] [sitnikov <email protected>: PHPLib bug]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Can you please post your code which does that?
I posted a response to this last month but never heard back any
replies. Did someone get a chance to test this sample code? Why
isn't the $user->delete() call actually deleting the user from the
user table?
------------ old message --------------
Ok, I made a real simple example that illustrates this behaviour.
This lets a new user register then immediately deletes them. No
matter what, the new user ALWAYS remains in the user_auth_md5
and active_sessions database tables.
<?PHP
page_open( array( "sess" => "Wh1_Session",
"user" => "Wh1_User",
"perm" => "Wh1_Perm",
"auth" => "Wh1_Auth" ) );
?>
<HTML><HEAD></HEAD><BODY>
<?PHP
if ($auth->is_authenticated()=='nobody') {
$auth->mode='reg';
$auth->login_if(1);
}
$perm->check("member");
echo "$username<p>";
$user->delete();
page_close();
?>
</BODY></HTML>
> > I basically want to return the user back to "nobody" *and* delete his
If user->delete starts working, will a delete revert the session back
to "nobody"?
> As the docs say for Session, if you what your changes to *any*
> registered
> variable to be saved you *must* use page_close() which does this by
> writing
> back to the defined storage.
Yes, but the sess->delete docs confuse my by saying that you SHOULDN'T
call page_close after a sess->delete. If user inherits delete from
sess then that would imply that you wouldn't want to page_close
there either.
Thanks for your help!
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.
- Next message: Kirill Maximov: "Re: [PHPLIB-DEV] [sitnikov <email protected>: PHPLib bug]"
- Previous message: Sascha Schumann: "[PHPLIB-DEV] [sitnikov <email protected>: PHPLib bug]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

