Silverstripe 4 LoginForm redirect default_login_dest - authentication

I've created a new page type called LoginPage.php. I'm using $LoginForm in the LoginPage template. I want users to be redirected to another page (HomePage.php) depending on what permissions group they are in. By default, if the user is not an administrator there is no redirect and it just reloads the current URL the user is on (LoginPage.php). I want the user to be redirected to HomePage.php.
I've tried using
Silverstripe\Security:
- default_login_dest: '/home'
But it has no effect. Maybe I'm using it wrong. Could someone please give clarify how to do this.

Related

Django - How to redirect to particular page after login using Django Panel Login functionality

I am using Class Based View, and in this particular form (based on FormView) I want restrict access to Logged Users only. It somehow works, but I want after user give login / password go back, redirect to particular site - for example named "my_form" or other (could be home page), but in this case, after login Django Admin shows. I need its functionality only for login and I want go back to desired location, 'my_form' page.
How can I achieve this? Don't want decorators here, as I want to use this special Mixin.
class EmployeeLocationFormView(LoginRequiredMixin, FormView):
login_url = 'admin:login'
redirect_field_name = 'my_form'

How to redirect to Different Page for User in Spartacus if he belongs to Different User group

When an employee logs in to CX if he has a salesManagerGroup I need to redirect to him a different page rather than a Home page.
How can I achieve this in Spartacus? Any document or steps would be helpful
You can create a guard to do this (please check how AuthGuard works).

How to create own login form in Joomla and how to create redirect file after login

I want to create my own login form. After user login , it will redirect to the mainpage which is same page when use default login form in Joomla in template. The problem is, i want to display the page by using my own login form. not use Joomla login form in template. How to create the login form then display on Joomla template? using php? I hope you can help me. I appreciate that.
You will need to override the components/com_users/views/login view in order to modify the look and feel of the login form. Yes - you will need to know/use PHP in order to do that.

change default joomla login page

i'm working on a Joomla web site where i would like to change the default authentication page.
i created a new login menu item and i've tried to hide the com content area so that the login form don't show. instead of the default login form i placed a new better looking login module.
now i'm trying to make this page the default login page.
There are a couple areas in the site where access is restricted to registered users. and if clicked it leads to the default joomla login page. i want the user to be redirected to login from the new one.
can you please help?
The easiest way to obtain your own custom login page is to override the default joomla layout template.
It's actually very easy to do.
Start with your template. In the template directories, you'll need to have an html folder in your template. Inside of that, you'll need a com_users directory, and inside of that - a login folder. Like this:
/templates/YOURTEMPLATE/html/com_users/login
Then, copy /components/com_users/views/login/tmpl/default_login.php into your new login folder you just created.
From here, you can customize the default_login.php file to your hearts content. Be sure to keep the field names and hidden fields intact - be sure to only manipulate layout elements and avoid changing anything to do with the form, form name, destination or fields.
You can do the same for the logout template - and as a bonus, it goes in the same folder in your template.

Joomla mod_login vs com_user

I'm having a very weird issue with user logins.
I'm building a site where all the content/menus are only available after you login.
I made a 'login' through the Modules and assign it the "userlogin" position.
Now when I go to the home page or any page, the login box comes up, but there's also a second login form. It seems to be coming from com_user.
This com_user login form doesn't work. I can't login using any credentials. If it was working I can simply remove my login module.
Is there a way I can either:
get com_user to work with normal user logins
or
disable this and so I can only see the Module login.
I can hide it from CSS, but I want to know where it's coming from.
Check the menu link which you have created should be public.
If these are not public then whenever user clicks it, he/she will be asked for login. Thats why the second login option is coming up.