From 1440d03a0098a250ee86b3713ab8c039d3d31828 Mon Sep 17 00:00:00 2001 From: Laurent Opprecht Date: Fri, 13 Apr 2012 15:17:49 +0200 Subject: [PATCH] shibboleth authentication module #4554: ensure auth source is set to shibb --- main/auth/shibboleth/app/shibboleth.class.php | 3 +++ 1 file changed, 3 insertions(+) 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;