Comment 0 for bug 1487464

Revision history for this message
Kevin Rickis (rdx565) wrote :

Mahara version: 15.04.1

Issue: When a user logs in via SAML and the configuration option is set to update the user's details then a new email artefact is created every time.

I think I have traced the problem

saml/lib.php line #234 calls set_profile_field($user->id, 'email', $email);

lib/user.php lines #511-516 are a try{} in which $email = artefact_instance_from_type('email', $userid); is called.

This fails with the message "This artefact type is not a 'singular' artefact type" and so a new email artefact is created.

It will always fail because artefact/internal/lib.php lines #705-708 return false for is_singular()

class ArtefactTypeEmail extends ArtefactTypeProfileField {
    public static function is_singular() {
        return false;
    }