|
|
|
@ -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; |
|
|
|
|