Page Index Toggle Pages: 1 [2] 
Topic Tools
 10 Login tab from Reset password screen (Read 505 times)
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Login tab from Reset password screen
Reply #6 - Aug 23rd, 2012 at 10:35pm
Post Tools
Your solution breaks the redirect feature - test it. My solution is the correct way to do it.

All you did is remove the '$sesredir' variable which is absolutely needed. Smiley

« Last Edit: Aug 23rd, 2012 at 10:36pm by Derek Barnstorm »  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,078
Location: Earth

YaBB 2.6.0
Re: Login tab from Reset password screen
Reply #5 - Aug 23rd, 2012 at 10:27pm
Post Tools
My solution was to simply change the link in the login tab (in TabMenu.pl) to 'action=login' and forget the other stuff. And knowing how I've been forgetting to add explanations, I probably forgot to add which file had to be edited.  Embarrassed



« Last Edit: Aug 23rd, 2012 at 10:38pm by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Login tab from Reset password screen
Reply #4 - Aug 23rd, 2012 at 9:00pm
Post Tools
Yep. It throws the errors because you are redirected back to 'reminder2', but no information has been passed through the form - so with the code I posted, you will be redirected to the board index.
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,078
Location: Earth

YaBB 2.6.0
Re: Login tab from Reset password screen
Reply #3 - Aug 23rd, 2012 at 8:54pm
Post Tools
But when you use the login tab from the password reset screen it takes you to a login screen that gives you errors like: 'The Verification code was not filled out. It is required. '  (It logs you in but with bizarre errors.)

The regular (non-redirected) login page doesn't do that. (And I didn't change the redirect for the 'back' link. That goes 'back' like it's supposed to.)

Edited:
And now I see you've posted some code.

« Last Edit: Aug 23rd, 2012 at 8:57pm by Dandello »  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Login tab from Reset password screen
Reply #2 - Aug 23rd, 2012 at 8:53pm
Post Tools
In Sources/LogInOut.pl find:

Code (Perl)
Select All
        $FORM{'sredir'} = '' if $FORM{'sredir'} =~ /action=(register|login2)/; 


And replace with:

Code (Perl)
Select All
        $FORM{'sredir'} = '' if $FORM{'sredir'} =~ /action=(register|login2|reminder|reminder2)/; 


Smiley
« Last Edit: Aug 24th, 2012 at 12:08am by Derek Barnstorm »  
Back to top
 
IP Logged
 
Derek Barnstorm
Support Team
YaBB Next Team
Development Team
Beta Testers
****
Offline



Posts: 1,269
Location: United Kingdom

None
Re: Login tab from Reset password screen
Reply #1 - Aug 23rd, 2012 at 8:14pm
Post Tools
That's not a good thing to do I'm afraid - it will break the redirect feature, so you'll be redirected to the Board Index instead of the page you were viewing before you logged in. Wink
  
Back to top
 
IP Logged
 
Dandello
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 2,078
Location: Earth

YaBB 2.6.0
Login tab from Reset password screen
Aug 14th, 2012 at 7:07pm
Post Tools
After asking for a password reset, the Login tab takes users to a login screen that doesn't actually work properly. The 'Back' link takes the user to the BoardIndex.

The fix:
find
Code
Select All
		$tab{'login'} = qq~<span |><a href="~ . ($loginform ? "javascript:if(jumptologin>1)alert('$maintxt{'35'}');jumptologin++;window.scrollTo(0,10000);document.loginform.username.focus();" : "$scripturl?action=login$sesredir") . qq~" title = "$img_txt{'34'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'34'}$tabfill</a></span>~;
 



replace with:
Code
Select All
		$tab{'login'} = qq~<span |><a href="~ . ($loginform ? "javascript:if(jumptologin>1)alert('$maintxt{'35'}');jumptologin++;window.scrollTo(0,10000);document.loginform.username.focus();" : "$scripturl?action=login") . qq~" title = "$img_txt{'34'}" style="padding: 3px 0 4px 0;">$tabfill$img_txt{'34'}$tabfill</a></span>~; 



I've tested this on my testboard and does appear to work.

  

If you only have one solution to a problem you're not trying hard enough!
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Topic Tools
 
  « Board Index ‹ Board  ^Top