MDL-69342 core_user: fixed user picture updating
authorVitaly <potenkov@gmail.com>
Tue, 15 Sep 2020 18:46:47 +0000 (21:46 +0300)
committerVitaly <potenkov@gmail.com>
Thu, 24 Sep 2020 07:29:31 +0000 (10:29 +0300)
commit7f177d440cfe3538e15fccd1397410b59597e1d5
treebb7215a77ad1499ad5f1f3f5edb304e3c4109d6b
parent611399214b29ccfef96cade265104f72ab6ffb78
MDL-69342 core_user: fixed user picture updating

When editing a user and checking the 'Delete picture' checkbox to delete
the old picture and uploading a new one at a time, the new one didn't appear
in the user profile. This happened due to the 'if/else' statement
in the 'core_user::update_picture()' method which allowed either to delete
the old picture or to upload a new one.
The fix removes the 'else' part of the 'if/else' statement to force
checking for a new uploaded picture no matter if a user checked
the 'Delete picture' checkbox or not.
lib/classes/user.php