From 4d2af2c2b22015a88cc2a819d23d58b5332e6ee4 Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Wed, 26 Jul 2017 18:37:48 +0100 Subject: sitenames --- src/fcontest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/fcontest.php') diff --git a/src/fcontest.php b/src/fcontest.php index fa68b72..8f636f7 100644 --- a/src/fcontest.php +++ b/src/fcontest.php @@ -268,6 +268,9 @@ function DBUserInfo($contest, $site, $user, $c=null,$hashpass=true) { } function cleanuserdesc($a) { $inst = explode(']',$a['userdesc']); + $a['userflag']=''; + $a['usershortinstitution']=''; + $a['usersitename']=''; if(isset($inst[1])) { $inst2 = explode('[',$inst[0]); if(isset($inst2[1])) @@ -276,7 +279,9 @@ function cleanuserdesc($a) { $a['userdesc']=trim($inst[2]); $inst = explode('[',$inst[1]); if(isset($inst[1])) { - $a['userflag'] = trim($inst[1]); + $inst2 = explode(',',trim($inst[1])); + $a['userflag'] = $inst2[0]; + if(isset($inst2[1])) $a['usersitename']=trim($inst2[1]); } } else { $a['userdesc']=trim($inst[1]); -- cgit v1.2.3