Examples of validateUsername()


Examples of org.encuestame.mvc.validator.ValidateOperations.validateUsername()

                    listError.put(type, getMessage("e_005", request, null));
                }
            } else if(type.equals(Profile.USERNAME.toString())) {
                log.debug("update username");
                final UserAccount account = getSecurityService().getUserAccount(getUserPrincipalUsername());
                if (operations.validateUsername(data, account)) {
                    security.updateAccountProfile(Profile.USERNAME, data);
                    setSuccesResponse(getMessage("settings_config_profile_success", request, null));
                } else {
                    listError.put(type, getMessage("e_018", request, null));
                }
View Full Code Here

Examples of org.encuestame.mvc.validator.ValidateOperations.validateUsername()

            log.debug("emailValid " +emailValid);
            if (!emailValid) {
                listError.put("username", getMessage("e_018", request, null));
                valid = false;
            }
            boolean usernameValid = operations.validateUsername(username, account);
            log.debug("usernameValid " +usernameValid);
            if (!usernameValid) {
                listError.put("email", getMessage("e_005", request, null));
               valid = false;
            }
View Full Code Here

Examples of org.encuestame.mvc.validator.ValidateOperations.validateUsername()

            // get the current user logged
            final UserAccount account = getUserAccount();
            final ValidateOperations cv = new ValidateOperations( getServiceManager().getApplicationServices()
                  .getSecurityService());
            boolean emailValid = cv.validateUserEmail(email, account);
            boolean usernameValid = cv.validateUsername(username, account);
            if (emailValid && usernameValid) {
                getServiceManager().getApplicationServices().getSecurityService().createUser(userBean, getUserPrincipalUsername());
                setSuccesResponse();
            } else {
                setError(getMessage("e_026", request, null), response);
View Full Code Here

Examples of org.encuestame.mvc.validator.ValidateOperations.validateUsername()

            final Map<String, Object> jsonResponse = new HashMap<String, Object>();
            final String valueFilteres = filterValue(value);
            final ValidateOperations operations = new ValidateOperations(getSecurityService(), getUserAccount());
            final UserAccount account = getUserAccount();
            if (Profile.findProfile(type).equals(Profile.USERNAME)) {
                if (operations.validateUsername(valueFilteres, account)) {
                    jsonResponse.put("validate", true);
                } else {
                    jsonResponse.put("validate", false);
                }
            } else if (Profile.findProfile(type).equals(Profile.EMAIL)) {
View Full Code Here

Examples of org.encuestame.mvc.validator.ValidateOperations.validateUsername()

                } else {
                    jsonResponse.put("msg", getMessage("secure.email.notvalid", request, null));
                }
            }
        } else if("username".equals(type)) {
            valid = validateOperations.validateUsername(value, null);
            if(value.isEmpty() || value.length() < ValidateOperations.MIN_USERNAME_LENGTH) {
                log.debug("validate username emtpy");
                jsonResponse.put("msg", getMessage("secure.username.empty", request, null));
            } else {
                log.debug("validate username NO emtpy");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.