Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-15-2015, 02:17 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,299
Kyttias is on a distinguished road
Arrow Seamless Login/Logout Redirect to Index

login/logout redirect
I can't believe I didn't figure this one out sooner! Inside view/loginview.php, inside each of the functions, add in this line before the $mysidia variable is set:
PHP Code:
header"Location: /" ); 

(The online users count won't update until you visit another page, btw?)

  Spoiler: loginview.php 
In case anyone needs my final version of the file (you shouldn't), here it is, for reference:
PHP Code:
<?php

class LoginView extends View{
    
    public function 
index(){
        
header"Location: /" );
        
$mysidia Registry::get("mysidia");
        
$document $this->document;

        if(
$mysidia->input->post("submit")){
            
$document->setTitle($this->lang->success_title);
            
$document->addLangvar("Welcome back {$mysidia->input->post("username")}{$this->lang->success}");
            return;
        }
        
        
$document->setTitle($this->lang->title);
        
$document->addLangvar($this->lang->login);

        
# $loginForm = $mysidia->frame->getSidebar()->getLoginBar();
        # $document->add($loginForm);    
    
}
    
    public function 
logout(){
        
header"Location: /" );
        
$mysidia Registry::get("mysidia");
        
$document $this->document;        
        
$document->setTitle($this->lang->logout_title);
        
$document->addLangvar($this->lang->logout);    
    }
}
?>
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
 

Tags
login, login redirect, redirect


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect after login Empress_Swanbottom Questions and Supports 10 06-03-2020 10:12 AM
Mys v1.3.4 Index Page Mod (Use PHP inside Index!) Kyttias Mys v1.3.x Mods 1 01-19-2015 10:49 PM
Custom pages redirect to index Vaporman87 Questions and Supports 6 02-21-2014 06:57 PM
Login/Logout Error tahbikat Questions and Supports 15 02-15-2014 10:26 AM
Redirect to Previous Page after Login/Logout fadillzzz Mys v1.1.x Mods 6 02-02-2011 05:24 PM


All times are GMT -5. The time now is 04:42 AM.

Currently Active Users: 9766 (0 members and 9766 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636