Hello,
I have a list of articles that can only be fully viewed by registered users. Guest users only see the teaser article. When one clicks on "read more" the login screen appears if the user isn’t logged in. I’d like to redirect the user to the document he/she was trying to view upon successful login. I think I need to set the parameter &liHomeId dynamically.
With WebLoginPE API it looks like one can invoke a plugin when event "OnWebLogin" is triggered. Does anyone know how the plugin should be written?
Any help is greatly appreciated.
Thanks
Thanks for the reply AHHP but unfortunately it returns an empty string... Does anyone know why?
Thanks
-
☆ A M B ☆
- 1,231 Posts
<?php
// redirect snippet
$notlogged_location ="unauthorised-access";
if(!isset($_SESSION['webValidated'])){
header("Location: $notlogged_location");
}
?>
Create a snippet with the the above code and put [[redirect]] on the pages that you wish that only logged in members can see. If that’s not of any use have you tried Phx?
[+phx:mo=`registered_member`:then=`full story text`:else=`Please register to read more...`+]