Prevent user registration form and 2nd login form Topic is solved

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Prevent user registration form and 2nd login form

Post by nigelj » Tue Jan 07, 2020 9:44 pm

When a user gets their username or password wrong they normally are presented with a warning message and the new user registration form

I don't want the registration form to appear at all, or the warning message...I just want the login page to refresh with the login form empty to start again (it's an intranet site where user accounts are created by the IT department...there is no situation where users ever have to create or edit their own account).

I have the Users > Options setting for Allow User Registration set to No, but the form still appears. Is it possible to switch off the form?

Thanks
Last edited by toivo on Sat Jan 11, 2020 4:23 am, edited 1 time in total.
Reason: mod note: retitled to reflect the thread

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 11828
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Prevent user registration form

Post by brian » Tue Jan 07, 2020 10:00 pm

They should not get the user registration form if it is disabled
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19907
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Prevent user registration form

Post by leolam » Wed Jan 08, 2020 3:54 am

As Brian mentioned: "check your settings"

Leo 8)
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
-> Joomla Webmaster Services: gws-webmaster.services

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form

Post by nigelj » Wed Jan 08, 2020 8:12 am

I have...see attachment.

I'm using the SCLogin extension but as these settings are in the user component I don't think that is relevant?
You do not have the required permissions to view the files attached to this post.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 11828
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: Prevent user registration form

Post by brian » Wed Jan 08, 2020 9:18 am

So the problem is nothing to do with the core of joomla but is clearly an issue in that extension and you would be best to contact the makers of that extension. I have never heard of it.

Which means that the settings for com_users are not relevant but it would have been extremely relevant to have said in your first post that you were not using the standard component
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form

Post by nigelj » Wed Jan 08, 2020 12:39 pm

Thanks

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent login form duplication

Post by nigelj » Fri Jan 10, 2020 1:39 pm

OK, so I've changed the login module back to the default Joomla one

If I try to login using a username and/or password that isn't a registered user, the page refreshes and I see the normal login form in the template position that I've set, but at the bottom of the page (above the footer) I see another login form (NOT a registration form...that was my mistake earlier in this thread).

The page has refreshed to this URL http://[domain]/index.php/component/users/?view=login&Itemid=586. What I wasnt it to do is refersh to the same page http://[domain].

Can someone point me in the direction of where to look for the issue?
You do not have the required permissions to view the files attached to this post.

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form

Post by nigelj » Fri Jan 10, 2020 10:30 pm

OK, so after installing a clean 3.9.14 site just for test purposes, when I intentionally enter the wrong username and/or password the page refreshes to show the other login form in the main content area. So, what I thought was an issue isn't, it's the default behaviour of the user/login module.

What I'm asking is how can I change this default behaviour so the page refreshes to the same page without the other login form appearing.

I'm not a developer so have no idea which php file/files is responsible for handling the login and generating the response...obviously it's that file/files I need to edit in some way.

Thanks

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8468
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Prevent user registration form

Post by sozzled » Fri Jan 10, 2020 10:51 pm

nigelj wrote:
Fri Jan 10, 2020 10:30 pm
OK, so after installing a clean 3.9.14 site just for test purposes, when I intentionally enter the wrong username and/or password the page refreshes to show the other login form in the main content area. So, what I thought was an issue isn't, it's the default behaviour of the user/login module.

What I'm asking is how can I change this default behaviour so the page refreshes to the same page without the other login form appearing.
Displaying a login form (as a result of entering a wrongly-entered username/password) is not what you asked at the beginning of this discussion. You created a topic to ask about to not display the account registration form. You are now seem to be asking about how to prevent displaying the user login form (after you have displayed the user login form) when someone enters the wrong account credentials on the user login form.

The "default" behaviour is normal. I don't know how to change the default behaviour. I accept the behaviour as normal; it's not worth my time to try to change it.

Are you asking, "If I display the login form, and someone enters the wrong account information, can I change the default behaviour of Joomla to not display the 'other' login form?" Is that what your new question means? As far as this discussion is concerned, the login form can show no link to create an account; depends on the settings for Users: Options (i.e. Allow User Registration = No). Your new question is quite different from your original question; start a new discussion (but I don't know the answer).
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form

Post by nigelj » Fri Jan 10, 2020 10:59 pm

Yeah...I realised earlier I'd asked the wrong question - sorry...maybe should start a new thread?

Yes, when a user enters the wrong credentials And clicks Log In I don't want to see the second login form in the content area when the page refreshes (I'm seeing another Login form, not a user registration form).

I have Allow User Registration set to No as in the screenshot earlier in the thread, but I'm seeing a second login form so not sure I'm looking at the right thing.
You do not have the required permissions to view the files attached to this post.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8468
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Prevent user registration form

Post by sozzled » Fri Jan 10, 2020 11:06 pm

Start a new thread. Use the "report to moderator" button to ask the forum moderators to lock this topic (to avoid the possibility of cross-posting). It's your topic: you can control what happens to it. ;)

I understand your changed question. I don't know (and don't really care) about how to change the behaviour. This behaviour has been a feature of J! since I cannot remember when. Good luck, though. 8)
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11755
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Prevent user registration form & 2nd login form

Post by toivo » Sat Jan 11, 2020 12:50 am

The second login form is a Login module. Its appearance can be prevented by creating a hidden menu, a menu that is not displayed as a menu module. Add to that menu an entry, selecting the Login Form from the users component:
  • Menu Item Type: Users - Login Form
  • Access: Guest
Go Extensions - Modules, find the Login module, go to the tab Menu Assignment and set the assignment in such a way that the Login module does not get displayed with the hidden menu entry.
Last edited by toivo on Sat Jan 11, 2020 4:24 am, edited 1 time in total.
Reason: mod note: retitled to clarify the reply
Toivo Talikka, Global Moderator

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form and 2nd login form

Post by nigelj » Sat Jan 11, 2020 9:11 am

Thank you Toivo, I'll take a look at that later.

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form & 2nd login form

Post by nigelj » Mon Jan 13, 2020 8:36 pm

toivo wrote:
Sat Jan 11, 2020 12:50 am
The second login form is a Login module. Its appearance can be prevented by creating a hidden menu, a menu that is not displayed as a menu module. Add to that menu an entry, selecting the Login Form from the users component:
  • Menu Item Type: Users - Login Form
  • Access: Guest
Go Extensions - Modules, find the Login module, go to the tab Menu Assignment and set the assignment in such a way that the Login module does not get displayed with the hidden menu entry.
Hi,

I can't get this working. I think I've done as you said, but something isn't right...
  • Created a hidden menu item with 1 item on it...Users>Login form. There's no module assigned to this menu
  • In Extensions>Module>Login module, I've set the access to the same setting as guest users are assigned to in the Users option - I've tried this with both public and registered but neither cause the 2nd login form to hide
Can you think of what I've missed? Thanks

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11755
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Prevent user registration form and 2nd login form

Post by toivo » Mon Jan 13, 2020 11:57 pm

nigelj wrote:There's no module assigned to this menu
Go to the Login module and check the settings in the tab Menu Assignment. Change the selection to 'Only on the pages selected' and check every menu item listed under 'Menu Selection' to make sure that the Login module appears on the Home page and that it does not appear with the new entry created for the Login form in the hidden menu.
Toivo Talikka, Global Moderator

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form and 2nd login form

Post by nigelj » Thu Jan 16, 2020 8:18 pm

I'm obviously something missing something in your instructions or doing something wrong here, as I can't get it working.

If you don't mind I'm going to Undo all the changes, then start them again, and if it still doesn't work I'll post screenshots here of the various backend pages so you can see what I've done?

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11755
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Prevent user registration form and 2nd login form

Post by toivo » Fri Jan 17, 2020 12:03 am

Ok, that is fine.
Toivo Talikka, Global Moderator

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26330
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Prevent user registration form and 2nd login form

Post by Per Yngve Berg » Fri Jan 17, 2020 5:29 am

In the URL of your previous post, it says "Itemid=586".

Did you set the login module to not show with this menu item?

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form and 2nd login form

Post by nigelj » Fri Jan 17, 2020 2:56 pm

Per Yngve Berg wrote:
Fri Jan 17, 2020 5:29 am
In the URL of your previous post, it says "Itemid=586".

Did you set the login module to not show with this menu item?
I did yes, but it still shows.

Screenshot attached - please ignore the purple background - I've changed it from white so you can see the elements.

So...itemid 586 is my main site login page. This page has public access. All that page has on it is the SCLogin module set to display in the module-position top-long in my Vision template. All other pages on the site are set to registered access. When a user logs in they are redirected to the 'regular' home page. When they logout they are redirected to the default home page, itemid 586.

If a non-registered user attempts to login, page 586 refreshes to show the 2nd login form. I think this is actually the user login component that is displaying in the main content area of the template, it's not a login module. The SCLogin module passes the parameters to the Joomla com_user component which is then responsible for the further actions - either login correctly and redirect, or display the 2nd form on a failed attempt (the user registration fields would also display on a failed attempt except I've switched that off in the options).

Obviously what I have is the default behaviour, and what you'd want on 99.9% of sites. A failed login redirects to try again, and/or register a new user. As this site will be a company intranet (on a hosted server) only registered company users are permitted access (the IT department controls new/removed users), which is why I just want to see the SCLogin form on the refresh.

So as this second login form appears to be the user login component, how can I prevent it from displaying. I can't see any way to add a component somewhere so I can hide it! I don't mind editing the core php file/s that control this behaviour if that is the only way to do this, but as I'm not a developer need some guidance on this so I don't break the site!!

Thanks!
You do not have the required permissions to view the files attached to this post.

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form and 2nd login form

Post by nigelj » Sat Jan 18, 2020 8:46 pm

So, I've removed the SCLogin login module and now I only have the Joomla login module on the page. After a failed attempt the 2nd module now doesn't appear, as it's already there!!!

Just need to work out how to remove the forgot username and password and remember me items now, then style the login fields and button!

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11755
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Prevent user registration form and 2nd login form

Post by toivo » Sun Jan 19, 2020 2:20 am

nigelj wrote:Just need to work out how to remove the forgot username and password and remember me items
Use the Template Manager to create an override for the login module or the login form and remove those options from the override code in the subfolder of the html folder of your template: https://docs.joomla.org/J3.x:How_to_use ... _Overrides.
Toivo Talikka, Global Moderator

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26330
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: Prevent user registration form and 2nd login form

Post by Per Yngve Berg » Sun Jan 19, 2020 10:40 am

"Remember me" is the plugin Authentication Cookie.

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form and 2nd login form

Post by nigelj » Thu Jan 23, 2020 3:30 pm

All sorted now, thanks very much for the various comments and help that eventually (!) led me to get it right!

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19907
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Prevent user registration form and 2nd login form

Post by leolam » Thu Jan 23, 2020 4:09 pm

nigelj wrote:
Thu Jan 23, 2020 3:30 pm
eventually (!) led me to get it right!
for others in same situation..... What did you do

Leo 8)
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
-> Joomla Webmaster Services: gws-webmaster.services

nigelj
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Tue May 29, 2007 1:42 pm
Location: Cheddington, UK

Re: Prevent user registration form and 2nd login form

Post by nigelj » Sat Jan 25, 2020 11:01 am

As this thread has got confusing as the subject changed because I asked the wrong question at the start, I'll create a new thread on this when I'm finished to record what I've done. I have another thread going about editing the user profile to remove the edit button that I need to resolve first...no replies on that one yet!


Post Reply

Return to “General Questions/New to Joomla! 3.x”