Best practice forum (Archived)

Security Req - New User Account - Email Notification

 
John Unnever
Security Req - New User Account - Email Notification
door John Unnever - Wednesday, 20 April 2016, 11:44 AM
Groep Partners

Hi everyone, 

We have a security requirement for the new user account emails to be broken out into 2 separate emails.  One must contain the user ID and the second email will contain the password. The username and password must not be included in the same email.

Is there a way to accomplish this in Totara?

me
Re: Security Req - New User Account - Email Notification
door George Angus - Wednesday, 20 April 2016, 20:46 PM
Groep Totara

Hi John,

How are the new users being created?

cheers,

George.

John Unnever
Re: Security Req - New User Account - Email Notification
door John Unnever - Wednesday, 20 April 2016, 21:54 PM
Groep Partners

Hi George, 

They are being created through the HR Import utility. 

me
Re: Security Req - New User Account - Email Notification
door George Angus - Tuesday, 26 April 2016, 21:12 PM
Groep Totara

Hi John,

It isnt possible at present. I could put in a feature request if you wish. I think the issue here is generating individual passwords and getting them into any existing messaging systems in Totara.

I suspect the only feasible solution would be to use a mail merge or similar.

regards,

George.

John Unnever
Re: Security Req - New User Account - Email Notification
door John Unnever - Friday, 27 May 2016, 11:14 AM
Groep Partners

Hi George,

Would you mind explaining the mail merge idea a little further?   Secondly, would there be any way that you might be able to point me in the direction of where the code is that gens up the new user account information emails so i can potentially look at any custom development options to modify it for our needs?

Thank you for your time!

John

 

me
Re: Security Req - New User Account - Email Notification
door George Angus - Sunday, 29 May 2016, 16:20 PM
Groep Totara

Hi John,

The mail merge idea was just a thought about sending emails external to Totara.

What you could do here is a language pack customisation to the email message which contains the username & password so only the password goes out. 

Then you could create Dynamic Audience based on some criteria which will filter new users. Under the Audience Enrolled Learning tab you could then use messaging functionality in either a Forum (within, say, a 'Welcome' course) or a 'Welcome' Program to send out the username.

I think it would be worth looking at rather than customising the code, which we don't support.

Hope this is useful,

cheers,

George.


John Unnever
Re: Security Req - New User Account - Email Notification
door John Unnever - Wednesday, 15 June 2016, 13:26 PM
Groep Partners

Hi George,

Do you know how I would find the email message in the language pack in order to modify it?

 

Craig Eves
Re: Security Req - New User Account - Email Notification
door Craig Eves (Totara Support) - Thursday, 16 June 2016, 18:43 PM
Groep Totara

You can find the email message through the language customisation area (Site admin > Languages > Language customisation)

Select and Open the language pack to modify

Highlight all of the modules and enter you search text for example password in "Only strings containing" 

The search results will show - the messages to change looks like it is newusernewpasswordtext there may be others as well 

Copy this text into the local customisation column and edit the text to what you want it to be.


John Unnever
Re: Security Req - New User Account - Email Notification
door John Unnever - Friday, 17 June 2016, 14:18 PM
Groep Partners

To everyone who has helped me here, thank you.  Just wanted to share what I did to satisfy our security requirement to have the user and pw sent in two separate emails.  First i modified the text in the language pack for the 'newusernewpasswordtext' entry to remove the username information..  and then i did the following.

 

I modified       function setnew_password_and_mail    in    /lib/moodlelib.php.  

I added 3 lines of code before the return statement.

//****CUSTOM CODE**********************************************************

$newUserSubject = "Welcome to Totara";
$newUserMessage = "Your username for Totara is " . $user->username;
email_to_user($user, $supportuser, $newUserSubject, $newUserMessage);

//*******************************************************************************************
return email_to_user($user, $supportuser, $subject, $message);

 

I know you don't recommend modifying the code, but this was a "show stopper" if we didn't have this working and it was a simple enough change to where it will be easy to test as updates come out.