diff --git a/main/auth/shibboleth/app/shibboleth.class.php b/main/auth/shibboleth/app/shibboleth.class.php index 186443c8a4..73cdd8c3db 100644 --- a/main/auth/shibboleth/app/shibboleth.class.php +++ b/main/auth/shibboleth/app/shibboleth.class.php @@ -10,6 +10,7 @@ class Shibboleth { + const NAME = 'shibboleth'; const UNKNOWN_STATUS = -1; const TEACHER_STATUS = 1; const STUDENT_STATUS = 5; @@ -152,6 +153,7 @@ class Shibboleth $user = User::store()->get_by_shibboleth_id($shibb_user->unique_id); if (empty($user)) { + $shibb_user->auth_source == self::NAME; return User::create($shibb_user)->save(); } @@ -163,6 +165,7 @@ class Shibboleth { $user->{$key} = $shibb_user->{$key}; } + $user->auth_source == self::NAME; } $user->save(); return $result;