Package hudson.model

Examples of hudson.model.User.save()


        // register the user
        User user = createAccount(si.username,si.password1);
        user.addProperty(new Mailer.UserProperty(si.email));
        user.setFullName(si.fullname);
        user.save();
        return user;
    }

    /**
     * Creates a new user account by registering a password to the user.
View Full Code Here


        User user;
        if (createAccountBaseOnCommitterEmail) {
            user = User.get(csAuthorEmail, true);
            try {
                user.setFullName(csAuthor);
                user.save();
            } catch (IOException e) {
                LOGGER.log(Level.FINEST, "Could not set author name to user properties.", e);
            }
        } else {
            user = User.get(csAuthor, true);
View Full Code Here

    @Test
    public void testFindOrCreateUserBasedOnEmail() throws IOException {
        mockStatic(User.class);
        User user = createMock(User.class);
        user.setFullName(AUTHOR_NAME);
        user.save();
        user.addProperty(EasyMock.<UserProperty>anyObject());
        expect(User.get(AUTHOR_EMAIL, true)).andReturn(user);
        replay(User.class, user);
        GitChangeSet changeSet = new GitChangeSet(new ArrayList<String>(), true);
        changeSet.findOrCreateUser(AUTHOR_NAME, AUTHOR_EMAIL, true);
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.