Using the global hooks file, we can redirect after signIn just by returning a URL.
Is there a way to redirect after signOut?
Redirect after signOut
Re: Redirect after signOut
Hi bdurfee,
actually, this should be easy.
Look at /index.php and look for the line
Here you should be able to do your stuff.
My index.php looks like this now ... see the include line. There I handle some logging once the user logges out - so you could simply use a php header to redirect the user to somewhere else.
Olaf
actually, this should be easy.
Look at /index.php and look for the line
Code: Select all
if(isset($_GET['signOut']))
My index.php looks like this now ... see the include line. There I handle some logging once the user logges out - so you could simply use a php header to redirect the user to somewhere else.
Code: Select all
<?php
$currDir = dirname(__FILE__);
define('HOMEPAGE', true);
include("{$currDir}/defaultLang.php");
include("{$currDir}/language.php");
include("{$currDir}/lib.php");
$x = new DataList;
$x->TableTitle = $Translation['homepage'];
// according to provided GET parameters, either log out, show login form (possibly with a failed login message), or show homepage
if(isset($_GET['signOut'])) {
include("{$currDir}/hooks/loguserout.php");
logOutUser();
redirect("index.php?signIn=1");
} elseif(isset($_GET['loginFailed']) || isset($_GET['signIn'])) {
if(isset($_GET['loginFailed'])) @header('HTTP/1.0 403 Forbidden');
include("{$currDir}/login.php");
} else {
include("{$currDir}/home.php");
}
Some postings I was involved, you might find useful:
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view
SingleEdit - Prevent concurrent edits on records; Field Permissions; Column-Value-Based-Permissions; Custom (error) message; Audit Log; Backup your database; Two Factor Authentication; Block brute force (failed) logins; Add 2nd SAVE CHANGES button; Place a search on details view