Skip to content

Commit

Permalink
Item1826: don't ask for a password if the user does not exist, it mak…
Browse files Browse the repository at this point in the history
…es HTTPDUser complain

git-svn-id: http://svn.foswiki.org/trunk/HTTPDUserAdminContrib@4511 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Jul 20, 2009
1 parent f9cdf84 commit d3bd55f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 6 additions & 1 deletion data/System/HTTPDUserAdminContrib.txt
Expand Up @@ -48,7 +48,12 @@ CREATE TABLE `HTTPDUsers`.`grouptable` (
</verbatim>

---+++ extra not yet documented functionality
This Contrib can also define and store group definitions in the same database.
This Contrib can also use group definitions in the same database. There is however no in-wiki user interface to create and maintain these groups for now.

you can for example use =mysql= to
<verbatim>
INSERT INTO grouptable (name, username) VALUES ('SuperGroup', 'testuser8') ;
</verbatim>

---++ Installation Instructions
1 Install %TOPIC%
Expand Down
9 changes: 6 additions & 3 deletions lib/Foswiki/Users/HTTPDUserAdminUser.pm
Expand Up @@ -155,8 +155,12 @@ sub fetchUsers {
sub fetchPass {
my( $this, $login ) = @_;
ASSERT( $login ) if DEBUG;
my $r = $this->{userDatabase}->password( $login );
$this->{error} = undef;

my $r;
if ($this->{userDatabase}->exists( $login )) {
$r = $this->{userDatabase}->password( $login );
$this->{error} = undef;
}
return $r;
}

Expand All @@ -165,7 +169,6 @@ sub checkPassword {

#TODO: this should be extracted to a new LoginManager i think
my $authen = new HTTPD::Authen($this->{configuration});
print STDERR "============================== check($login, $password)\n";
return $authen->check($login, $password);
}

Expand Down

0 comments on commit d3bd55f

Please sign in to comment.