How do I make the user login the same as the administrator login page? - joomla

I want to use the administrator login page as the standard user login page as well. How do I make this the default login page?
For example, my administrator login at: localhost/administrator/index.php is what I want to display when going to: localhost/index.php?option=com_users
Ideally, when a user is not logged in and they go to localhost, I want to redirect to the administrator login page, and then that page will redirect to the Administrator back-end, or the front-end, depending on their credentials.

To do so you need to create a new template, then set up a menu item for your login page and set your newly created template for that menu item.
If you want to copy the code from the actual login page you can find it here:
/administrator/templates/hathor/login.php
Remember to update the paths for any dependencies (eg. CSS files etc) or alternatively copy them to your new template directory.

Related

redirect back not saving auth()->user

I have a form to update user information including username. on the same page, there is a sidebar that has a profile button href="{{route('profile',auth()->user())}}"
once the form is saved I redirect to the same page, the route to update user info is
Route::post('/profile/{user:name}/update' , 'ProfileController#update')->name('update-profile');
so it contains the name ( not the id).
the issue is when the page is redirected back to the same page the profile button is still containing the old user name, which leads to 404. Is there any solution to redirect back and updating the auth user in the sidebar with a new username?
Thank you
That's strange it should normally work. You can do
\Auth::setUser($newUser);
to set a new one.

Wicket Submit BehaviorListener after RestartResponseExeption and Session replacement

I have a AjaxFallbackLink to add a product into the wishlist of a customer. When a guest clicks the Link he is redirected to the login page with a RestartResponseAtInterceptPage. After successful login he returned to the first Page. But the URL contains the IBehaviorListener of my "add to wishlist" Link and every Ajax Link does nothing except to reload the page with no changes. I think the problem is the incorrect match of Page instance and BehaviorListener instance because my Page started with instance 1 and returned with instance 4 from Login Page. Everything works when the guest is already logged in.
How can i remove the illegal URL parameter or call the right Link callback to add the product to wishlist after successful login?
I think you need to do the following, in YourApplication#init() add:
getPageSettings().setCallListenerInterfaceAfterExpiry(true)
You can override it per Page if you don't want to enable it globally, see org.apache.wicket.Component#canCallListenerInterfaceAfterExpiry()

Change Joomla's 'Login to Readmore' url from login page to register page?

I have a blog page on Joomla which shows 'register to read more' link after each articles intro text.
Clicking this brings the user to a login page, with no 'register' option.
How would I change this to bring a user to the register page instead, and preferably revert the user back to the article after login? I have a login box on the register page so it allows the user to choose either login or register.
If you're using Joomla 2.5 and you don't see a link saying something like "Don't have an account?" then you have User Registration turned off.
Go to the Users menu and select User Manager and then click on the Options icon in the toolbar. Under the Component tab set the first option Allow User Registration to Yes.
Save you changes and then click on one of the "Register to read more…" links and you should now see the extra "Don't have an account?"
If you want more than the basic Joomla! options for site access then you may want to look at the Joomla! Extensions Directory (JED) and the section on Site Access

How to change the default redirect page for logged out or unregistered users?

As the title says, I would like to change the default redirect page that Joomla redirects users, when they are logged out or unregistered. I just can't find which file I should edit. I am talking about Joomla 1.5.26 version.
You don't have to edit any files.
If your users are using the mod_login module to Logout you can specify a Logout Redirection Page (i.e. a menu item) in the module itself.
If you're using a "User Menu" with a Logout menu item you can specify in the menu item a Logout Redirection URL — note this a URL not a specific menu item as with the module.

About Joomla Registration Form

I'm using Joomla template... and I want to to register new user in it, but the problem is that whenever I create a new account and input all the fields and click on submit button the whole form is reset and no registration take place so help me out of this problem...
Check if new user registration is enabled in back-end settings. To do that - go to admin control panel, select Site > Global Configuration > System and check Allow User Registration parameter.

Resources