Package cn.edu.zju.acm.onlinejudge.persistence

Examples of cn.edu.zju.acm.onlinejudge.persistence.UserPersistence.login()


            profileForm.populate(profile, perference);
            context.setAttribute("ProfileForm", profileForm);
            return this.handleSuccess(mapping, context, "failure");
        }

        if (userPersistence.login(profileForm.getHandle(), profileForm.getPassword()) == null) {
            return this.handleFailure(mapping, context, "password", "ProfileForm.password.invalid");
        }

        UserProfile newProfile = profileForm.toUserProfile();
        newProfile.setId(profile.getId());
View Full Code Here


     */
    private ActionMessages authenticate(LoginForm form, ContextAdapter context) throws PersistenceException {
        context.getRequest().getSession().invalidate();
        ActionMessages errors = new ActionMessages();
        UserPersistence userPersistence = PersistenceManager.getInstance().getUserPersistence();
        UserProfile profile = userPersistence.login(form.getHandle(), form.getPassword());

        // no such user
        if (profile == null) {
            errors.add("password", new ActionMessage("LoginForm.password.invalid"));
            return errors;
View Full Code Here

                }
            }
            if (handle != null && password != null) {
                try {
                    UserPersistence userPersistence = PersistenceManager.getInstance().getUserPersistence();
                    UserProfile profile = userPersistence.login(handle, password);

                    if (profile != null && profile.isActive()) {

                        AuthorizationPersistence authorizationPersistence =
                                PersistenceManager.getInstance().getAuthorizationPersistence();
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.