Skip to content

Commit

Permalink
- cosmetic fixes
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.php.net/repository/pear/packages/LiveUser/trunk@188825 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
Lukas Smith committed Jun 20, 2005
1 parent 6146249 commit 0cb9fc5
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions Auth/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,28 +493,29 @@ function login($handle, $passwd)
{
// Init value: Is user logged in?
$this->loggedIn = false;

// Read user data from database
$success = $this->readUserData($handle, $passwd);
if (!$this->readUserData($handle, $passwd)) {
return false;
}

// If login is successful (user data has been read)
if ($success == true) {
// ...we still need to check if this user is declared active
if ($this->isActive !== false) {
// ...and if so, we have a successful login (hooray)!
$this->loggedIn = true;
$this->currentLogin = time();
}
// ...we still need to check if this user is declared active
if ($this->isActive !== false) {
// ...and if so, we have a successful login (hooray)!
$this->loggedIn = true;
$this->currentLogin = time();
}

// In case Login was successful, check if this can be counted
// as a _new_ login by definition...
if ($this->updateLastLogin == true &&
$this->isNewLogin() == true && $this->loggedIn == true
) {
$this->_updateUserData();
}
// In case Login was successful, check if this can be counted
// as a _new_ login by definition...
if ($this->updateLastLogin == true &&
$this->isNewLogin() == true && $this->loggedIn == true
) {
$this->_updateUserData();
}

return $success;
return true;
}

/**
Expand Down

0 comments on commit 0cb9fc5

Please sign in to comment.