Hi all!
First of all I am not a native English speaker so you might encounter some mistakes here and there.
I apologise in advance.
I don't even know if this is the right place to post my request for some help. My apologies if it's the wrong forum.
I managed to install US with ease. No major problems.
What I am looking for is, besides managing users (I can easily do that with the admin panels), to be able to have some basic tasks that, becoause of my very basic knowledge of PHP, I haven't been able to figure out properly.
When a user goes to a "protected" page I need the user to be presented with a login page if not logged in already, or continue reading the page if logged in.
After login, I need the user to get back to where it was stopped because the user had to login and continue.
Besides that, I would like to have user name on the top right side of each page he visits after login with the option to edit his profile and log out if desired.
Does any of you guys have some spare time to waste to provide me some detailed guidance for this?
I tried adding the suggested piece of code on top of the pages I wish to protect:
?>
require_once '../users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/template/prep.php';
if(isset($user) && $user->isLoggedIn()){
}
?>
What happens id that if I login as Admin I get the dashboard (which is fine) but if I login as User, I am redirected to the main page, while I would like the following:
If login ok, then continue visiting the page, if not redirected to another page of my choice.
I thank everybody in advance for any help you may provide.
Best and congrats for the great scripts provided to all.
Carlo
First of all I am not a native English speaker so you might encounter some mistakes here and there.
I apologise in advance.
I don't even know if this is the right place to post my request for some help. My apologies if it's the wrong forum.
I managed to install US with ease. No major problems.
What I am looking for is, besides managing users (I can easily do that with the admin panels), to be able to have some basic tasks that, becoause of my very basic knowledge of PHP, I haven't been able to figure out properly.
When a user goes to a "protected" page I need the user to be presented with a login page if not logged in already, or continue reading the page if logged in.
After login, I need the user to get back to where it was stopped because the user had to login and continue.
Besides that, I would like to have user name on the top right side of each page he visits after login with the option to edit his profile and log out if desired.
Does any of you guys have some spare time to waste to provide me some detailed guidance for this?
I tried adding the suggested piece of code on top of the pages I wish to protect:
?>
require_once '../users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/template/prep.php';
if(isset($user) && $user->isLoggedIn()){
}
?>
What happens id that if I login as Admin I get the dashboard (which is fine) but if I login as User, I am redirected to the main page, while I would like the following:
If login ok, then continue visiting the page, if not redirected to another page of my choice.
I thank everybody in advance for any help you may provide.
Best and congrats for the great scripts provided to all.
Carlo