Package org.apache.roller.business

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


        assertNotNull(user);
        assertEquals(testUser, user);
       
        // modify user and save
        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);
        user = null;
        user = mgr.getUserByUserName(testUser.getUserName());
        assertNull(user);
       
        // remove test user
View Full Code Here

        assertTrue(user.hasRole("editor"));
        assertTrue(user.hasRole("admin"));
       
        // remove role
        user.revokeRole("admin");
        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 (msgs.isEmpty()) {
                        try {
                            // Persist changes to user
                            mgr.saveUser(user);
                            RollerFactory.getRoller().flush();
                           
                            msgs.add(ActionMessages.GLOBAL_MESSAGE,
                                    new ActionMessage("userSettings.saved"));
                            saveMessages(request, msgs);
View Full Code Here

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

                    }
                }
               
                // save the updated profile
                UserManager mgr = RollerFactory.getRoller().getUserManager();
                mgr.saveUser(data);
                RollerFactory.getRoller().flush();
               
                request.setAttribute("model", new BasePageModel(
                        "yourProfile.title", request, response, mapping));
               
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.