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
/printthread.php 16 require_once



UserSpice
How to set the page shown after the user login - Printable Version

+- UserSpice (https://userspice.com/forums)
+-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23)
+--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26)
+--- Thread: How to set the page shown after the user login (/showthread.php?tid=1308)



How to set the page shown after the user login - Aido - 01-18-2019

Hi,

now the user is redirected to users/account.php after the successful login
How to change it?
For example, I would like to keep the user on the home page?

Eugene


RE: How to set the page shown after the user login - mudmin - 01-18-2019

(01-18-2019, 10:38 AM)Aido Wrote: Hi,

now the user is redirected to users/account.php after the successful login
How to change it?
For example, I would like to keep the user on the home page?

Eugene

Hi Aido,
It is set in the dashboard on the settings page.  It's called Redirect after login I believe.
You will see that it currently says users/account.php in the box.


RE: How to set the page shown after the user login - Aido - 01-18-2019

(01-18-2019, 10:39 AM)mudmin Wrote:
(01-18-2019, 10:38 AM)Aido Wrote: Hi,

now the user is redirected to users/account.php after the successful login
How to change it?
For example, I would like to keep the user on the home page?

Eugene

Hi Aido,
It is set in the dashboard on the settings page.  It's called Redirect after login I believe.
You will see that it currently says users/account.php in the box.

Sorry, I could not find it...

Dear UserSpice users

could you help me to find this setting? :-)


RE: How to set the page shown after the user login - mudmin - 01-18-2019

I'm sorry. It's in 4.4 but idk what happened to the setting in 4.3.
The easiest thing to do is to add a line to usersc/scripts/custom_login_script.php and just put Redirect::to('index.php');

Note that you can do conditional logic like

if(hasPerm([2],$user->data()->id)){ //admin
Redirect::to('admin.php);
}else{
Redirect::to('index.php');
}


RE: How to set the page shown after the user login - Aido - 01-18-2019

Thank you!


RE: How to set the page shown after the user login - mudmin - 01-18-2019

Happy to help. Just know that when you update to 4.4 that setting will override what you put in the dashboard.