Package org.apache.roller.weblogger.business

Examples of org.apache.roller.weblogger.business.UserManager.saveUser()


               
                if (user != null) {
                    // enable user account
                    user.setEnabled(Boolean.TRUE);
                    user.setActivationCode(null);
                    mgr.saveUser(user);
                    WebloggerFactory.getWeblogger().flush();
                   
                    setActivationStatus("active");
                   
                } else {
View Full Code Here


                }
           
                RollerContext.flushAuthenticationUserCache(getUser().getUserName());

                // save the updated profile
                mgr.saveUser(getUser());
                WebloggerFactory.getWeblogger().flush();
               
                addMessage("userAdmin.userSaved");
                               
                return INPUT;
View Full Code Here

            }
           
            try {
                // save the updated profile
                UserManager mgr = WebloggerFactory.getWeblogger().getUserManager();
                mgr.saveUser(existingUser);
                WebloggerFactory.getWeblogger().flush();
               
                // TODO: i18n
                addMessage("profile updated.");
               
View Full Code Here

            ud.setEnabled(entry.getEnabled());
        }
       
        try {
            UserManager mgr = getRoller().getUserManager();
            mgr.saveUser(ud);
            getRoller().flush();
            CacheManager.invalidate(ud);
        } catch (WebloggerException re) {
            throw new InternalException("ERROR: could not update user data", re);
        }
View Full Code Here

        assertEquals(testUser, user);
       
        // modify user and save
        user.setScreenName("testtesttest");
        user.setFullName("testtesttest");
        mgr.saveUser(user);
        TestUtils.endSession(true);
       
        // make sure changes were saved
        user = null;
        user = mgr.getUser(id);
View Full Code Here

        assertNotNull(user);
        assertEquals(testUser.getUserName(), user.getUserName());
       
        // make sure disable users are not returned
        user.setEnabled(Boolean.FALSE);
        mgr.saveUser(user);
        TestUtils.endSession(true);
        user = null;
        user = mgr.getUserByUserName(testUser.getUserName());
        assertNull(user);
       
View Full Code Here

        assertTrue(user.hasRole("editor"));
        assertTrue(user.hasRole("admin"));
       
        // remove role
        mgr.revokeRole("admin",user);
        mgr.saveUser(user);
        TestUtils.endSession(true);
       
        // check that role was removed
        user = null;
        user = mgr.getUserByUserName(testUser.getUserName());
View Full Code Here

        assertTrue(user.hasRole("editor"));
        assertFalse(user.hasRole("admin"));
       
        // add role
        user.grantRole("admin");
        mgr.saveUser(user);
        TestUtils.endSession(true);
       
        // check that role was added
        user = null;
        user = mgr.getUserByUserName(testUser.getUserName());
View Full Code Here

               
                if (user != null) {
                    // enable user account
                    user.setEnabled(Boolean.TRUE);
                    user.setActivationCode(null);
                    mgr.saveUser(user);
                    WebloggerFactory.getWeblogger().flush();
                   
                    setActivationStatus("active");
                   
                } else {
View Full Code Here

                }
            }

            try {
                // save the updated profile
                mgr.saveUser(existingUser);
                WebloggerFactory.getWeblogger().flush();

                // TODO: i18n
                addMessage("profile updated.");
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.