Loris icon indicating copy to clipboard operation
Loris copied to clipboard

[user_accounts] New user not sent email / prompted for new password

Open CamilleBeau opened this issue 5 years ago • 8 comments

Describe the bug Written in TestPlan:

  1. Check that if creating a new user an email is sent to him/her (requires email server). Also check that when a new user is logging in for the first time he/she is asked to change his/her password.

An email is only sent if the "Send email to user" button is selected. When a new user is logging in for the first time, they are not prompted to change their password. This is either a bug, or an outdated testplan.

To Reproduce Steps to reproduce the behavior (attach screenshots if applicable):

  1. Create a new user without selecting "Send email to user"
  2. See that no email is sent to user
  3. Create a new user using an email that you have access to and select "Send email to user" (an email should be sent)
  4. Log in as this new user for the first time. Notice that you are not prompted to change password.

CamilleBeau avatar Sep 04 '20 13:09 CamilleBeau

I think the not being prompted is a bug.

driusan avatar Sep 15 '20 14:09 driusan

@CamilleBeau I just tested and was redirected to the Update password page.

laemtl avatar Sep 17 '20 21:09 laemtl

@laemtl Strange! On my dev I am still getting no password prompt

CamilleBeau avatar Sep 18 '20 14:09 CamilleBeau

@CamilleBeau Can you paste the users table entry here?

laemtl avatar Sep 18 '20 15:09 laemtl

@laemtl This is from the users table after making a new user and before logging in with that user image

CamilleBeau avatar Sep 23 '20 15:09 CamilleBeau

If the user with ID=2 is the one you request an account for, I notice 2 problems: PasswordChangeRequired is not set to 1, and account_request_date is NULL. Not sure exactly why, but I do not have that issue on my local VM. I will try on the test VM to be sure.

--edit User is prompted for a new password on first login if the password was generated only.

laemtl avatar Sep 23 '20 18:09 laemtl

Tested and it also works on the test VM.

laemtl avatar Sep 23 '20 18:09 laemtl

@driusan Is the new user supposed to be prompted for a new password when logging in for the first time always or only when generate password is selected while creating the user?

CamilleBeau avatar Oct 14 '20 19:10 CamilleBeau

I just tested this again on the updated code. This issue is persisting in that a new user is not always sent an email (only when if "Send email to user" is selected). I'm not sure if this is intended or not? @driusan @ridz1208

CamilleBeau avatar Jan 31 '23 18:01 CamilleBeau

given the name of that checkbox, I'm gonna say yes its intended. but if I remember correctly if you check the generate password box, you have to select the send email to user to be able to save

ridz1208 avatar Jan 31 '23 18:01 ridz1208

@ridz1208 Makes sense. In this case maybe we should just modify the language in the following TestPlan step to specify that the checkbox should still be checked in order to send an email to new user.

  1. Check that if creating a new user an email is sent to him/her (requires email server). Also check that when a new user is logging in for the first time he/she is asked to change his/her password.

CamilleBeau avatar Jan 31 '23 18:01 CamilleBeau

@CamilleBeau Do you have time to take care of this?

laemtl avatar May 30 '23 13:05 laemtl

@CamilleBeau Do you have time to take care of this?

Yes, no problem!

CamilleBeau avatar May 30 '23 13:05 CamilleBeau