Author: jfthomps
Date: Mon May 7 20:40:20 2012
New Revision: 1335246
URL: http://svn.apache.org/viewvc?rev=1335246&view=rev
Log:
VCL-418
simplify adding LDAP authentication
modified ldapLogin - get skin for setting cookie from affiliations table so
this function does not need to be modified for each skin that is added
Modified:
incubator/vcl/trunk/web/.ht-inc/authentication.php
Modified: incubator/vcl/trunk/web/.ht-inc/authentication.php
URL:
http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/authentication.php?rev=1335246&r1=1335245&r2=1335246&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/authentication.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/authentication.php Mon May 7 20:40:20 2012
@@ -441,12 +441,9 @@ function ldapLogin($authtype, $userid, $
else
setcookie("VCLAUTH", "{$cookie['data']}", 0, "/",
COOKIEDOMAIN, 0);
# set skin cookie based on affiliation
- /*if(getAffiliationName($authMechs[$authtype]['affiliationid'])
== 'EXAMPLE1')
- setcookie("VCLSKIN", "EXAMPLE1", (time() + (SECINDAY *
31)), "/", COOKIEDOMAIN);
-
elseif(getAffiliationName($authMechs[$authtype]['affiliationid']) == 'EXAMPLE2')
- setcookie("VCLSKIN", "EXAMPLE2", (time() + (SECINDAY *
31)), "/", COOKIEDOMAIN);
- else*/
- setcookie("VCLSKIN", "DEFAULT", (time() + (SECINDAY *
31)), "/", COOKIEDOMAIN);
+ $skin =
getAffiliationTheme($authMechs[$authtype]['affiliationid']);
+ $ucskin = strtoupper($skin);
+ setcookie("VCLSKIN", "$ucskin", (time() + (SECINDAY * 31)),
"/", COOKIEDOMAIN);
// redirect to main page
header("Location: " . BASEURL . SCRIPT);
dbDisconnect();