This forum is archived. Posts are preserved for historical reference. For current help, join us on Discord.

How to set the page shown after the user login

In UserSpice 4.3 and Below · Started by Aido on 2019-01-18 10:38 am · 16662 views · 5 replies

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,

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.

[quote='Aido' pid='7281' dateline='1547807906']
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.
[/quote]

Sorry, I could not find it...

Dear UserSpice users

could you help me to find this setting? :-)
sett.jpeg
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');
}
Thank you!
Happy to help. Just know that when you update to 4.4 that setting will override what you put in the dashboard.