Author: andreas
Date: Fri Dec 14 08:36:17 2007
New Revision: 604219
URL: http://svn.apache.org/viewvc?rev=604219&view=rev
Log:
Use UserManager.contains() to verify user existence instead of null check.
Modified:
lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/users/user-admin.js
Modified: lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/users/user-admin.js
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/users/user-admin.js?rev=604219&r1=604218&r2=604219&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/users/user-admin.js (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/webapp/lenya/content/admin/users/user-admin.js Fri Dec 14 08:36:17 2007
@@ -249,14 +249,10 @@
var messages = new Packages.java.util.ArrayList();
- var userid = new Packages.java.lang.String(email);
var email = new Packages.java.lang.String(email);
- var existingUser = userManager.getUser(userId);
-
- if (existingUser != null &&
- !existingUser.getClass().getName().equals("org.apache.lenya.ac.impl.TransientUser")) {
- messages.add("This user already exists.");
+ if (userManager.contains(userId)) {
+ messages.add("This user already exists.");
}
if (!Packages.org.apache.lenya.ac.impl.AbstractItem.isValidId(userId)) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.