logout redirects to home page, fixes #119
This commit is contained in:
parent
cf8b518aa3
commit
925e225ee9
@ -15,7 +15,7 @@ function login_validate() {
|
|||||||
$pass = trim(@$_POST ['pass']);
|
$pass = trim(@$_POST ['pass']);
|
||||||
|
|
||||||
$error = array();
|
$error = array();
|
||||||
$lerr = & $lang ['login'] ['error'];
|
$lerr = &$lang ['login'] ['error'];
|
||||||
|
|
||||||
if (!$user) {
|
if (!$user) {
|
||||||
$error ['user'] = $lerr ['user'];
|
$error ['user'] = $lerr ['user'];
|
||||||
@ -46,7 +46,8 @@ function main() {
|
|||||||
user_logout();
|
user_logout();
|
||||||
|
|
||||||
function myredirect() {
|
function myredirect() {
|
||||||
// login_redirect('.');
|
// logout redirects to home page
|
||||||
|
login_redirect('.');
|
||||||
}
|
}
|
||||||
|
|
||||||
add_filter('wp_head', 'myredirect');
|
add_filter('wp_head', 'myredirect');
|
||||||
@ -55,6 +56,7 @@ function main() {
|
|||||||
} elseif (user_loggedin()) {
|
} elseif (user_loggedin()) {
|
||||||
|
|
||||||
function myredirect() {
|
function myredirect() {
|
||||||
|
// login redirects to Admin Area
|
||||||
login_redirect('admin.php');
|
login_redirect('admin.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user