Forward those who sign out to a specific page

It is a cool idea to transfer those who sign out to a PAGE that tells them they are signed out and maybe showing some message asking them to come back soon and, perhaps, show them some product list they might be interested with.

So, this code is a modification of auth.php

My new lines are header and exit with previous line commented out around line 200 (not sure I have some new code in this file):

```php if ($mode == ‘logout’) {

fn_save_cart_content($_SESSION[‘cart’], $auth[‘user_id’]);

$auth = $_SESSION[‘auth’];

if (!empty($auth[‘user_id’])) {

// Log user logout

fn_log_event(‘users’, ‘session’, array(

‘user_id’ => $auth[‘user_id’],

‘time’ => TIME - $auth[‘this_login’],

‘timeout’ => false




fn_clear_cart($_SESSION[‘cart’], false, true);

fn_delete_cookies(AREA_NAME . ‘_user_id’, AREA_NAME . ‘_password’);

//return array(CONTROLLER_STATUS_OK, $index_script);

header(‘Location: /come-again.html’);


} ```

The difficulty was that none of the following worked:


return array(CONTROLLER_STATUS_OK, ‘come-again.html’);




For some reason these returns to a controller with a redirect page made no difference… it still would transfer them to the same page you were on while logging off.

So, I had to forcibly redirect, it is not wrong but not really graceful as it could have been.

Anyway, set come-again.html to GUEST view only (if you want to)

Also, you can redirect your customers to a specific page when they LOG-IN based on their price group.

Similarly, I was able to REDIRECT customers to a different PAGE that looks similar to a home page but with really specific products and messages for that particular group.

That landing page has permission of that specific group only.