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
Redirect After Login based on Username
#9
Ok. So....
1. Redirect::to($us_url_root.$user->data()->id->admin. "101/index.php") ;
will redirect you to something that doesn't exist because $user->data()->id->admin doesn't exist. I also don't know what the 101 is

If you are trying to get a user named admin to go to a link like mydomain.com/admin101/index.php that is
Redirect::to($us_url_root.$user->data()->username. "101/index.php") ;

If you just want him to go to mydomain.com/admin/index.php that is
Redirect::to($us_url_root.$user->data()->username. "/index.php") ;


2. Redirect::to($us_url_root.$user->data()->id->Steven."calendar/");
if you are trying to redirect a user named steven to mydomain.com/Steven/calendar that is
Redirect::to($us_url_root.$user->data()->username. "/calendar") ;

$user->data()->username will output the username of the logged in user, so you don't need to type it out.
  Reply


Messages In This Thread
RE: Redirect After Login based on Username - by mudmin - 04-25-2019, 08:00 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)