If you want to email USER/PASS after creating a new user, then you can modify the file "webadmin/admin_adduser.html", find this line: AddUser(domain,user)
And insert the following line below it:
if user.note_email ~= "" then
c_SendMail(user.note_email,"Your account name and password","Your account name and password<br>Username: "..user.username.."<br>Password: "..user.password,"","SMTP_CONFIG")
end
Here, user.note_email is the email address defined at "User -> Notes -> Email address", SMTP_CONFIG is the SMTP configuration name, you can add a SMTP configuration at "Server > Settings > SMTP Manager".
And if you want to force user changing his password, just check on this option "Domain > Settings > General Settings > Password & Security > Need to change the password on the first logon".
Email username and password after creating a new user
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
-
- Posts: 19
- Joined: Fri May 10, 2013 1:39 pm
Re: Email username and password after creating a new user
About forcing password change is it possible to choose it at user and not and domani level?
We have different kind of users some of which need to change password and other who must not change it.
Thank you
We have different kind of users some of which need to change password and other who must not change it.
Thank you
-
- Posts: 1
- Joined: Thu Oct 20, 2011 10:53 pm
Re: Email username and password after creating a new user
What do I need to add that this email gets only sent when the field is not empty or will it do that anyways?
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Email username and password after creating a new user
Do you mean the "note_email" field? If it is empty, of course you can't send the email successfully.
-
- Posts: 3
- Joined: Thu Feb 09, 2017 10:35 pm
Re: Email username and password after creating a new user
First, you need to add the c_SendMail function before the AddUser function to not send md5 password to your user.
The c_SendMail function seems to work only when connected as main Admin, when it is an admin limited to some domains, it is not working. No email was sent.
Do you know why ?
Regards 1
The c_SendMail function seems to work only when connected as main Admin, when it is an admin limited to some domains, it is not working. No email was sent.
Do you know why ?
Regards 1
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Email username and password after creating a new user
Yes, the Lua API "c_SendMail" can be used by the system admin only.