1 22 23 package org.meshcms.taglib; 24 25 import java.io.*; 26 27 32 public final class User extends AbstractTag { 33 public void writeTag() throws IOException { 34 String result = null; 35 36 if (id != null) { 37 id = id.toLowerCase(); 38 39 if (id.equals("username")) { 40 result = userInfo.getUsername(); 41 } else if (id.equals("email") || id.equals("e-mail")) { 42 result = userInfo.getEmail(); 43 } else { 44 result = userInfo.getValue(id); 45 } 46 } 47 48 if (result == null) { 49 result = userInfo.getDisplayName(); 50 } 51 52 getOut().write(result); 53 } 54 } 55 | Popular Tags |