The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New to US and in need of some help
#1
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
  Reply


Messages In This Thread
New to US and in need of some help - by Carlo - 05-11-2019, 04:13 PM
RE: New to US and in need of some help - by Carlo - 05-14-2019, 07:21 PM
RE: New to US and in need of some help - by Carlo - 05-16-2019, 03:45 AM
RE: New to US and in need of some help - by Carlo - 05-17-2019, 10:40 AM
RE: New to US and in need of some help - by Carlo - 05-17-2019, 04:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)