r4936 - trunk/src/edu/ucsb/nceas/metacat
cjones at ecoinformatics.org
cjones at ecoinformatics.org
Wed Apr 29 12:50:10 PDT 2009
Author: cjones
Date: 2009-04-29 12:50:09 -0700 (Wed, 29 Apr 2009)
New Revision: 4936
Modified:
trunk/src/edu/ucsb/nceas/metacat/AuthSession.java
Log:
In AuthSession, I've modified the formatOutput() method to include both the email and organization values found in the userInfo array. On successful login(), this changes the returned xml to include <email> and <organization> elements if they exist in the userInfo array. This information is useful to web client applications that need to show login status beyond just the users full name.
Modified: trunk/src/edu/ucsb/nceas/metacat/AuthSession.java
===================================================================
--- trunk/src/edu/ucsb/nceas/metacat/AuthSession.java 2009-04-29 17:28:52 UTC (rev 4935)
+++ trunk/src/edu/ucsb/nceas/metacat/AuthSession.java 2009-04-29 19:50:09 UTC (rev 4936)
@@ -222,6 +222,18 @@
out.append(userInfo[0]);
out.append("\n</name>\n");
}
+
+ if(userInfo != null && userInfo[1]!=null){
+ out.append("\n<organization>\n");
+ out.append(userInfo[1]);
+ out.append("\n</organization>\n");
+ }
+
+ if(userInfo != null && userInfo[2]!=null){
+ out.append("\n<email>\n");
+ out.append(userInfo[2]);
+ out.append("\n</email>\n");
+ }
try {
// insert <isAdministrator> tag if the user is an administrator
More information about the Metacat-cvs
mailing list