Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-21174

Administration: Bulk upload of user profile pictures - exclude deleted users

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7
    • Fix Version/s: 1.9.8, 2.0
    • Component/s: Administration
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      When bulk uploading users, as far as I can tell there is not check not to upload photos for deleted users. One site sent me a message regarding problems they were having with deleted users. They were using the description field and had customized things but I do not think it is unreasonable to exclude or by-pass deleted users. In this particular case, they were using LDAP for authentication and there was a deleted user account and an active user account. The picture was allegedly being applied to the first user it found meeting the requirement; however, since that account was marked as deleted it actually does not. The problem is that the correct/active user account is not getting updated so I thought that if we were to add a where clause to ensure that deleted accounts were not included it would avoid the problem. Peace - Anthony

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            aborrow Anthony Borrow added a comment -

            Here is one possible way of limiting to only non-deleted users. In the case of LDAP this can be helpful if a user was deleted and then re-created there will be two entries in the table which could theoretically have duplicate idnumber since the database does not prevent duplicates so theoretically this could be helpful. Peace - Anthony

            Show
            aborrow Anthony Borrow added a comment - Here is one possible way of limiting to only non-deleted users. In the case of LDAP this can be helpful if a user was deleted and then re-created there will be two entries in the table which could theoretically have duplicate idnumber since the database does not prevent duplicates so theoretically this could be helpful. Peace - Anthony
            Hide
            iarenaza Iñaki Arenaza added a comment -

            +1 for the patch

            Saludos,
            Iñaki.

            Show
            iarenaza Iñaki Arenaza added a comment - +1 for the patch Saludos, Iñaki.
            Hide
            aborrow Anthony Borrow added a comment -

            Thanks for the review of the patch, I will wait for Moodle.com to either commit or assign the issue to me. Peace - Anthony

            Show
            aborrow Anthony Borrow added a comment - Thanks for the review of the patch, I will wait for Moodle.com to either commit or assign the issue to me. Peace - Anthony
            Hide
            rwijaya Rossiani Wijaya added a comment - - edited

            Hi Anthony,

            Thank you for reporting and creating a patch for this issue.

            I reviewed the patch and it works for my 1.9.7 version. My +1 for the patch.

            Rosie

            Show
            rwijaya Rossiani Wijaya added a comment - - edited Hi Anthony, Thank you for reporting and creating a patch for this issue. I reviewed the patch and it works for my 1.9.7 version. My +1 for the patch. Rosie
            Hide
            dougiamas Martin Dougiamas added a comment -

            Yep np with that, can you check in please Rossiani?

            Show
            dougiamas Martin Dougiamas added a comment - Yep np with that, can you check in please Rossiani?
            Hide
            rwijaya Rossiani Wijaya added a comment -

            committed to 19_stable and HEAD.

            Show
            rwijaya Rossiani Wijaya added a comment - committed to 19_stable and HEAD.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Mar/10