[Phplib-trackers] [ phplib-Bugs-460463 ] Default Auth "cancel" button
Brought to you by:
nhruby,
richardarcher
|
From: <no...@so...> - 2001-09-10 21:27:39
|
Bugs item #460463, was opened at 2001-09-10 14:27 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=460463&group_id=31885 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Richard Archer (richardarcher) Assigned to: Nobody/Anonymous (nobody) Summary: Default Auth "cancel" button Initial Comment: Reposted from -users list: I need a little help with a problem I'm having. It's probably really simple, but I can't seem to hack my way through it. I am using default authentication on a site. I have a link at the top of the page that can be used to login. When you click the link, it takes you to a page that does a: page_open(...); $auth->login_if ( $auth->auth[uid] == "nobody" ); page_close(); This pulls up auth's corresponding login dialog. The problem is, I have a cancel button on this dialog. No matter what I put behind the cancel, I can't get rid of the login dialog (unless I enter a valid username and password). I'm currently trying to make the cancel button link to a logout page that does: my_page_open(); $auth->logout (true); my_page_close(); But this doesn't work. The logout page apparently generates another login page before it gets to the logout() function. Thanks in advance for ANY help! -bpopp ------------------------------------------------- But there a specific name for that cancel button, default I think 'cancel_button', specified in the Auth var $cl. Did you use that name for the input field/link_querystr? Then method start of Auth (that is any phplib Auth'd page) should take care of that. No need for a special ACTION also see: http://marc.theaimsgroup.com/?l=phplib&m=94269299705992&w=2 dunno if it's already in the code. -Gian -------------------------------------------------- List: phplib Subject: Re: [PHPLIB] Bailing out of loginform.ihtml? From: Mike Green <Mik...@sa...> Date: 1999-11-15 18:58:54 [Download message RAW] Well, maybe I'm not quite tuned in to your problem, but if I am the following could help: I use have modified the function auth_validatelogin() given in the sample local.inc (local.inc,v 1.23 1999/08/25 11:40:48 kk) so that the first few lines are: function auth_validatelogin() { global $username, $password; if(isset($username)) { $this->auth["uname"]=$username; ## This provides access for "loginform.ihtml" }else if ($this->nobody){ ## provides for "default login cancel" $uid = $this->auth["uname"] = $this->auth["uid"] = "nobody"; return $uid; } $uid = false; ... [instead of function auth_validatelogin() { global $username, $password; if(isset($username)) { $this->auth["uname"]=$username; ## This provides access for "loginform.ihtml" } $uid = false; ... ] As I study what I've done here I can see that it suffers from a classic case of insufficient documentation. When I created this ("hack"?!) I think I figured out what needed to be done and did this. Now that I look at it I'm cannot explain it -- except that it is working :-) ... or should that be a ;-(... Cheers! Mike ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=460463&group_id=31885 |