From 218bca49122d1235410b7949ec94d577cd5babc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Fri, 27 Feb 2009 22:14:18 +0000
Subject: [PATCH] Make smartname module handle userids without @

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1341 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/smartnameattribute/lib/Auth/Process/SmartName.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/smartnameattribute/lib/Auth/Process/SmartName.php b/modules/smartnameattribute/lib/Auth/Process/SmartName.php
index 906c036e8..6275a792b 100644
--- a/modules/smartnameattribute/lib/Auth/Process/SmartName.php
+++ b/modules/smartnameattribute/lib/Auth/Process/SmartName.php
@@ -47,6 +47,7 @@ class sspmod_smartnameattribute_Auth_Process_SmartName extends SimpleSAML_Auth_P
 	}
 	
 	private function getLocalUser($userid) {
+		if (strpos($userid, '@') === FALSE) return NULL;
 		$decomposed = explode('@', $userid);
 		if(count($decomposed) === 2) {
 			return $decomposed[0];
-- 
GitLab