User tests: Successful: Unsuccessful:
To test:
Select the user you are currently logged in with only and batch reset their password (with a value of yes or no).
Before the patch you'll get a mysql warning. After the patch you'll get a notice that no users have been selected.
This is because you cannot reset the password of the currently logged in user so suddenly you are trying to batch reset no users.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
It works though if you change to
if (empty($user_ids))
{
$this->setError(JText::_('COM_USERS_USERS_NO_ITEM_SELECTED'));
return false;
}
No more mysql error, even when selecting multiple users including yourself. In that last case the "Require Password Reset" param is applied to the other users only.
Maybe we would need a new string btw;
Something like:
COM_USERS_USERS_ERROR_CANNOT_REQUIRERESET_SELF="You can't require a Password reset for yourself."
This is what comes of copy/pasting the wrong snippet of code from my local server. Thanks JM! Fixed now!
What about the new language string? The one in the PR does not make much sense in this context as a user has been selected.
Agree with @infograf768 this needs a different language string
@wilsonge can you do that please
Labels |
Added:
?
|
Done and rebased onto staging at the same time
I have tested this item successfully on 3ca055a
I have tested this item successfully on 3ca055a
Status | Pending | ⇒ | Ready to Commit |
Labels |
RTC - thanks
RTC - thanks
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-02-16 10:05:46 |
Closed_By | ⇒ | roland-d |
Labels |
Removed:
?
|
This does not work here.
If I choose another user than the one logged in and set Batch Require Password Reset to "No" or "Yes", I get the same message.