suggestions for forcing pw and email change on first login

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
linuxpc4me
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Nov 10, 2011 12:54 pm

suggestions for forcing pw and email change on first login

Post by linuxpc4me » Thu Aug 29, 2019 9:31 pm

I have built an appointment booking site for local law enforcement (probation) to use to book assessments for offenders
I am given the amound of officers in a particular location.
because of the fluidity of officers staying in one spot, I create login ID's that do not change, that way as officers come and leave, tracking of appointments is easier for them. For example, there are 50 officers working at the main st office. So the template for login id's would be:
MainPO1 - mainpo50
Also, I have no idea of their email address also so I create one to use when creating accounts mainpo1@m.com (mainpo1 identifies the officer and @m.com is constant)

Here is my dilema, I need the officers to change the 'filler' name, email, and phone number with their information (the login id remains intact)

I found a plugin to force password change, but I need a way to force email change as well

I could write an "on demand" script to replace the email address and phone data (in the jos_user table) with nothing, that would force them to correct the missing information in order to use the appointment software
But that is kludgy, not time sensitive.

I cannot find any password tools that work well in the newest Joomla build (some include forcing re-entering email) but, they just do not work reliably.

So I am asking for any suggestions. I am not a sql or php coder. I have learned a number of basic tasks but I know I do not have the skill to write a plugin to force pw and email change on first login and have it actually without blowing up the site

NOTE: forgot to mention the two plugins I saw were DJpass and PasswordControl.

Thanks for any input
Last edited by linuxpc4me on Thu Aug 29, 2019 9:41 pm, edited 1 time in total.

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

Re: suggestions for forcing pw and email change on first login

Post by sozzled » Thu Aug 29, 2019 9:35 pm

Apologies. Let me think about this some more.
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
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8000
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: suggestions for forcing pw and email change on first login

Post by sozzled » Thu Aug 29, 2019 9:44 pm

Although you asked a similar question a couple of days ago; see viewtopic.php?f=706&t=972719&p=3578689#p3578688, I am not aware of an extension that forces a change of email address as well as forcing a change of password. That's an unusual requirement but, as you have outlined, it's not beyond the realm of possibility.

I searched the internet for a similar request and I only found one reference, here: viewtopic.php?t=861286. Again, most of the discussion centred around forcing a change of password. So, no, I don't know of the existence of an extension that forces a change of email address. As I say, it's highly unusual; if there was a call for it, I think it would be fairly easy to find with a search on Google. I tried to find something about "force email change joomla" in Google; I failed to find anything that may be useful to you, sorry.

Maybe someone else will have better luck than me?
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?” :)

linuxpc4me
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Nov 10, 2011 12:54 pm

Re: suggestions for forcing pw and email change on first login

Post by linuxpc4me » Thu Aug 29, 2019 10:34 pm

Thank you. Yes I consulted Professor Google and found the same results. The DJPass Redirection plugin ( https://dj-extensions.com/documentation ... edirection ) does allow for a forced email change, but the plugin does not work on the two Joomla sites I have.
This is why I am considering building an sql script for the removal of my 'filler' emails. The table "users" allows a switch to force password reset, but I cannot find a setting within Joomla to take advantage of this. If I knew coding better, and if Joomla did have the force pw change, I could maybe modify the table, adding a similar switch for the password.
yes this is very unusual. I only look for a way to do so to ensure they get the automated messages the system provides. An email of filler@m.com will not work. Others say the users should be responsible enough to take 30 second to put t heir correct information in. Well, that does not happen.

So again, thank you for your thoughtful responses.

User avatar
john-doe
Joomla! Guru
Joomla! Guru
Posts: 902
Joined: Tue Apr 19, 2011 7:39 pm
Location: Colombia
Contact:

Re: suggestions for forcing pw and email change on first login

Post by john-doe » Fri Aug 30, 2019 2:04 pm

linuxpc4me wrote:
Thu Aug 29, 2019 9:31 pm

So I am asking for any suggestions. I am not a sql or php coder. I have learned a number of basic tasks but I know I do not have the skill to write a plugin to force pw and email change on first login and have it actually without blowing up the site

NOTE: forgot to mention the two plugins I saw were DJpass and PasswordControl.

Thanks for any input
Never worked on it, but if i understood correctly, Password Control is working correctly by forcing the password change.

I would see a bit the inside of the plugin/component if a tweak can be done to force the email change using the same mechanics.

Since it involves Law Enforcement it's understandable that there is no Development URL available to see how is implemented at this moment and then see a structure that might help. However finding that out (for me since i know some code but i'm not developer / coder, since i'm designer), might take some time, but worth to try.
www.aldemar-hernandez.com - Custom templates and design services.

User avatar
john-doe
Joomla! Guru
Joomla! Guru
Posts: 902
Joined: Tue Apr 19, 2011 7:39 pm
Location: Colombia
Contact:

Re: suggestions for forcing pw and email change on first login

Post by john-doe » Fri Aug 30, 2019 2:28 pm

Got a better idea:

Can you build a blank development site that has only that feature so it can be tested and can be done modifications verify and afterwards set it up on the Live servers?
www.aldemar-hernandez.com - Custom templates and design services.

linuxpc4me
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Nov 10, 2011 12:54 pm

Re: suggestions for forcing pw and email change on first login

Post by linuxpc4me » Fri Aug 30, 2019 11:51 pm

john-doe -

I certainly can build a site just to see how many times it can be broke.

User avatar
john-doe
Joomla! Guru
Joomla! Guru
Posts: 902
Joined: Tue Apr 19, 2011 7:39 pm
Location: Colombia
Contact:

Re: suggestions for forcing pw and email change on first login

Post by john-doe » Sat Aug 31, 2019 2:14 am

linuxpc4me wrote:
Fri Aug 30, 2019 11:51 pm
john-doe -

I certainly can build a site just to see how many times it can be broke.
Actually the idea was to see if an override can be done... and keep the actual development of the sites under the confidentiality.
www.aldemar-hernandez.com - Custom templates and design services.

linuxpc4me
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Nov 10, 2011 12:54 pm

Re: suggestions for forcing pw and email change on first login

Post by linuxpc4me » Sat Aug 31, 2019 3:36 pm

I can build one up when I get back to work.

Will be on ubuntu 18.04; mysql; apache2; ssh; latest joomla with several users (admin + registered).
Will have the two plugins in the Download folder I have tried to use

Anything else?

User avatar
john-doe
Joomla! Guru
Joomla! Guru
Posts: 902
Joined: Tue Apr 19, 2011 7:39 pm
Location: Colombia
Contact:

Re: suggestions for forcing pw and email change on first login

Post by john-doe » Sat Aug 31, 2019 4:22 pm

linuxpc4me wrote:
Sat Aug 31, 2019 3:36 pm
I can build one up when I get back to work.

Will be on ubuntu 18.04; mysql; apache2; ssh; latest joomla with several users (admin + registered).
Will have the two plugins in the Download folder I have tried to use

Anything else?
For the moment that would be enough
www.aldemar-hernandez.com - Custom templates and design services.

linuxpc4me
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Nov 10, 2011 12:54 pm

Re: suggestions for forcing pw and email change on first login

Post by linuxpc4me » Sat Aug 31, 2019 11:17 pm

Will let you know as soon as I have it built. Probably Wednesday - Thursday

User avatar
john-doe
Joomla! Guru
Joomla! Guru
Posts: 902
Joined: Tue Apr 19, 2011 7:39 pm
Location: Colombia
Contact:

Re: suggestions for forcing pw and email change on first login

Post by john-doe » Sun Sep 01, 2019 12:34 am

linuxpc4me wrote:
Sat Aug 31, 2019 11:17 pm
Will let you know as soon as I have it built. Probably Wednesday - Thursday
No problem. In the mena time i'll get a copy of the components so i can study them

Code: Select all

DJpass and PasswordControl.
www.aldemar-hernandez.com - Custom templates and design services.

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

Re: suggestions for forcing pw and email change on first login

Post by brian » Mon Sep 02, 2019 1:30 am

As the ability to force a password change is a core feature then I would not expect it to be complicated to extend that to also force an email change
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

linuxpc4me
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Nov 10, 2011 12:54 pm

Re: suggestions for forcing pw and email change on first login

Post by linuxpc4me » Wed Sep 04, 2019 3:11 pm

UPDATE on the issue:

I have a found a "bandaid" fix to the forcing of email and password change on first login

On the new user creation form in Jooma, all the way at the bottom is a switch to force pw change on first login Y/N

This by itself works fine (although I'd like to change default to "Y" but that is for another post)

on new user creation, selecting yes, joomla does force password change on initial login but does not address email

That is were the plugin "PasswordControl" comes in. One of its functions is mandating email change as well
however, it does not work.

here is link for the plugin ( https://macrotoneconsulting.co.uk/downloads )

I became bold and looked in the php file ( passwordcontrol.php file and found the defaults for parameters

$session = JFactory::getSession();
$passwordforce = (int) $session->get('password_force',0,'PasswordControl');
$emailforce = (int) $session->get('email_force',0,'PasswordControl');

I changed the 'email_force',0, to a value of 1 and now it forces email change on initial login PROVIDING

The new user creation switch is set to 'change on first login = Y'

I tested 10 times with new test users and it works well each time.

It DOES NOT use it's own forms as it should, but uses joomla user profile form (again another issue for another post)

My question is: can someone who is proficient in php look at the passwordcontrol.php file in this plugin and understand why it
will not change the emailforce value when selecting change email on first login?


Thanks

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

Re: suggestions for forcing pw and email change on first login

Post by leolam » Wed Sep 04, 2019 4:05 pm

Just the funny part on forcing an email change...... What about if you only have one email which you want to use and the plugin checks that when you submit your current email it has been in use and not allowed to re-use? That means you cannot change and you are locked out...ahum? I am also emotionally nor technically finding any reason to force an email change....It is not add more security and it is just limiting and inconvenient

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

linuxpc4me
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Nov 10, 2011 12:54 pm

Re: suggestions for forcing pw and email change on first login

Post by linuxpc4me » Wed Sep 04, 2019 5:59 pm

leolam,

I'm glad you asked this.

In my application, I set up accounts for 50+ probation officers at a time to access the system. The login id is static:
It stays with the position, not the person. So, if you move to another location, resign, etc. and I take your place, the login stays the same in order to track referrals / appointments over time.
So when I create a user, I'll toss a phony email and phone like me@me.com; 111-222-3333 into the account I create. On the first login, you would be forced to "individualize" your credentials with your actual name, email and phone. The process would repeat each time the login id were to transfer to the new person.

I would not care about mandatory changing of emails in a traditional website user account, as i would have it set up for 'requesting an account' that I would reply to using the email you provided.

I tried to figure out a simpler way, but this one seemed to be the one with the least headaches.


Post Reply

Return to “Administration Joomla! 3.x”