Skip to content

Commit

Permalink
JENKINS-7096 - Stop users being created in memory if registration fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mc1arke committed Jan 14, 2012
1 parent f8f4860 commit 255a3e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -63,6 +63,9 @@
<li class="rfe">
OS X installer can optionally create a new user &quot;jenkins&quot; and use
it. This user has a writable home directory, making it possible to set up ssh for Jenkins.
<li class="bug">
Stop users being created in memory if they failed to provide all the required registration information correctly.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-7096">issue 7096</a>)
</ul>
</div><!--=TRUNK-END=-->

Expand Down
Expand Up @@ -302,9 +302,9 @@ private User createAccount(StaplerRequest req, StaplerResponse rsp, boolean self
if(si.username==null || si.username.length()==0)
si.errorMessage = "User name is required";
else {
User user = User.get(si.username);
if(user.getProperty(Details.class)!=null)
si.errorMessage = "User name is already taken. Did you forget the password?";
User user = User.get(si.username, false);
if (null != user)
si.errorMessage = "User name is already taken";
}

if(si.fullname==null || si.fullname.length()==0)
Expand Down

0 comments on commit 255a3e6

Please sign in to comment.