shibboleth authentication module #4554: ensure auth source is set to shibb

skala
Laurent Opprecht 14 years ago
parent 3b575968c1
commit 1440d03a00
  1. 3
      main/auth/shibboleth/app/shibboleth.class.php

@ -10,6 +10,7 @@
class Shibboleth class Shibboleth
{ {
const NAME = 'shibboleth';
const UNKNOWN_STATUS = -1; const UNKNOWN_STATUS = -1;
const TEACHER_STATUS = 1; const TEACHER_STATUS = 1;
const STUDENT_STATUS = 5; const STUDENT_STATUS = 5;
@ -152,6 +153,7 @@ class Shibboleth
$user = User::store()->get_by_shibboleth_id($shibb_user->unique_id); $user = User::store()->get_by_shibboleth_id($shibb_user->unique_id);
if (empty($user)) if (empty($user))
{ {
$shibb_user->auth_source == self::NAME;
return User::create($shibb_user)->save(); return User::create($shibb_user)->save();
} }
@ -163,6 +165,7 @@ class Shibboleth
{ {
$user->{$key} = $shibb_user->{$key}; $user->{$key} = $shibb_user->{$key};
} }
$user->auth_source == self::NAME;
} }
$user->save(); $user->save();
return $result; return $result;

Loading…
Cancel
Save