Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Front End User Login Plugin (XML Or Database - ver: 3.0)
Has anyone used this to block their entire website ?

I am thinking I will have a hook check for logged in session and redirect to login and then somehow get login to redirect back to the referrer.

Without using page checkboxes at all.

Has anyone figured either of those out.

EDIT:
This is what I am using so far, it seems to be working ok.
probably needs some work, like preserving query strings etc.
Was done using my hook component plugin

Code:
// called from index-pretemplate hook
  GLOBAL $id;
  $login_slug = 'login';
  user_login_check();  
  // not logged in redirect to login form save redirect
  if(empty($_SESSION['LoggedIn']) and $id!=$login_slug) {
      redirect($SITEURL.$login_slug.'?redirect='.$id);
  }
  else if(!empty($_SESSION['LoggedIn'])){
    if(isset($_GET['redirect'])){
      redirect($SITEURL.$_GET['redirect']);    
    }
  }
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
Example site down, having issues - by Rich_K - 2012-11-14, 07:36:37
login box won't display - by horstuff - 2015-11-20, 04:57:25
Front End User Login Plugin (XML Or Database - ver: 3.0) - by shawn_a - 2012-10-24, 02:07:26



Users browsing this thread: 3 Guest(s)