The following warnings occurred: | ||||||||||||||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Redirect After Login based on Username - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.4 (https://userspice.com/forums/forumdisplay.php?fid=27) +--- Thread: Redirect After Login based on Username (/showthread.php?tid=1451) Pages:
1
2
|
RE: Redirect After Login based on Username - mudmin - 04-26-2019 Ok, so in usersc/includes/custom_login_script.php if($user->data()->username == 'admin'){ Redirect::to('x.html'); }elseif($user->data()->username == 'Steven'){ Redirect::to('w.html'); }elseif($user->data()->username == Alex){ Redirect::to('564.html'); } RE: Redirect After Login based on Username - maxikz - 04-29-2019 great this is exactly what I needed. Thank you very much! RE: Redirect After Login based on Username - Malatesa - 04-30-2019 (04-25-2019, 08:14 PM)maxikz Wrote: ok so username. = user that just logged in.. $url = strtolower($user->data()->username); Redirect::to($us_url_root.$url); John goes to example.com/john James goes to example.com/james Or if you want to redirect to other pages, add a field in the users database table that contains the destination Code: // this adds a field into the users table |