Remove explicit user::login() call from create_and_login_user() since user::create() calls
user::login() if the user creation is successful
This commit is contained in:
@@ -55,7 +55,9 @@ function create_and_login_user($sTestEmail, $sTestPassword)
|
|||||||
$oUser = new User();
|
$oUser = new User();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create the user */
|
// create the user
|
||||||
|
// NOTE: user::create() will call user::login() to login the user
|
||||||
|
// if the user creation is successful
|
||||||
$retval = $oUser->create($sTestEmail, $sTestPassword, "Test user", "20051020");
|
$retval = $oUser->create($sTestEmail, $sTestPassword, "Test user", "20051020");
|
||||||
if($retval != SUCCESS)
|
if($retval != SUCCESS)
|
||||||
{
|
{
|
||||||
@@ -69,14 +71,6 @@ function create_and_login_user($sTestEmail, $sTestPassword)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* login the user */
|
|
||||||
$retval = $oUser->login($sTestEmail, $sTestPassword);
|
|
||||||
if($retval != SUCCESS)
|
|
||||||
{
|
|
||||||
error("Got '".$retval."' instead of SUCCESS(".SUCCESS.")");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $oUser;
|
return $oUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user