Comment 5 for bug 1740330

Revision history for this message
Niranjan (niranjan528) wrote :

Environment to be tested: Master
Browser to be tested: Any browser

Precondition:

1. A user with 'Site admin' access exists.
2. Make sure to allow emails to one email account by adding the following two parameters to the config.php file:
 - $cfg->sendemail = true;
 - $cfg->sendallemailto = '<valid email>';

Note: ‘Valid email’ here is your personal email address so you receive all outgoing emails no matter the recipient.

Steps to reproduce:

1. Log in as ‘Site admin’.
2. Navigate to Administration menu > Configure site > Site options.
3. Click the 'Account seetings' drop-down menu.
4. Set the 'Default account inactivity time' to 1 day and click the 'Update site options' button.
5. Open the terminal and connect to the database.
6. Update the user table in order to change the last login by giving the command ' update usr set lastlogin='2018-01-13 16:44:24', lastlastlogin='2018-01-12 09:10:17' where username='admin';'
7. Run the cron manually by adding /lib/cron.php to the end of the wwwroot of your site.

Expected result: The content of the Account inactivity warning email that is sent to the user looks like the following:

Dear xxx,

Your account on Mahara will become inactive on 1 February 2018.

Once inactive, you will not be able to log in until an administrator re-enables your account.

You can prevent your account from becoming inactive by logging in.

Regards,
Site administrator.

Note: Validate the content by viewing the text in both 'Original HTML' and plain text.

8. Similarly set the 'Default account lifetime' to 1 day and click the 'Update site option' button.
9. Open the terminal and connect to the database.
10. Update the user table in order to change the last login by giving the command ' update usr set lastlogin='2018-01-13 16:44:24', lastlastlogin='2018-01-12 09:10:17' where username='admin';'
11. Run the cron manually by adding /lib/cron.php to the end of the wwwroot of your site.

Expected result: The content of the Account expiry warning email that is sent to the user should look like the following:

Dear xxx,

Your account on Mahara will expire on 1 February 2018.

If you wish to keep your portfolio content after your account expires, we recommend you export your portfolio via export/index.php.

If you wish to extend your account access or have any questions regarding the above, please feel free to contact us.

Regards,
Site administrator.

Note: Validate the content by viewing the text in both 'Original HTMl' and plain text.