protected String getGroupNameFromContext(String context) { String retVal = ""; if (context != null) { int index = context.indexOf("group-"); if (index != -1) { String[] parts = StringUtil.splitFirst(context, "-"); if (parts.length > 1) { retVal = parts[1]; } } else { retVal = context; } } return retVal; }
/** * Find a user object who has this email address. Update the object with the information found. * * @param email * The email address string. * @return true if the user object was found and information updated, false if not. */ public boolean findUserByEmail(UserEdit edit, String email) { if (m_requirelocalaccount) return false; // lets not get messed up with spaces or cases String test = email.toLowerCase().trim(); // if the email ends with "domain.tld" (even if it's from somebody@foo.bar.domain.tld) // use the local part as a user id. if (!test.endsWith(m_domain)) return false; // split the string once at the first "@" String parts[] = StringUtil.splitFirst(test, "@"); edit.setEid(parts[0]); return getUser(edit); } // findUserByEmail
String parts[] = StringUtil.splitFirst(configs[i], "."); if ((parts != null) && (parts.length == 2))
String prefix[] = StringUtil.splitFirst((id.length() > 1) ? id.substring(1) : "", Entity.SEPARATOR); if (prefix.length > 0)