type = $userType; $this->primary = false; } private static function endsWith($haystack, $needle) { return substr($haystack, -strlen($needle)) === $needle; } /** * Workaround for IA2 users */ public function getUIType() { if ($this->eppn !== null && $this->endsWith($this->eppn, '@ia2.inaf.it')) { return 'IA2'; } else { return $this->type; } } }