mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
More useful error message when user_name and user_xup conflict
During e_user_provider::signup()
This commit is contained in:
@@ -1474,7 +1474,7 @@ class e_user_provider
|
|||||||
{
|
{
|
||||||
if ($redirectUrl)
|
if ($redirectUrl)
|
||||||
{
|
{
|
||||||
e107::getRedirect()->redirect($redirectUrl);
|
$this->redirectAndForwardMessages($redirectUrl);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
// throw new Exception( "Signup failed! User already signed in. ", 1); // TODO lan
|
// throw new Exception( "Signup failed! User already signed in. ", 1); // TODO lan
|
||||||
@@ -1535,11 +1535,16 @@ class e_user_provider
|
|||||||
if ($uid = $sql->retrieve("user", "user_id", "user_xup='" . $sql->escape($this->userId()) . "' " . $insert . " OR user_loginname='{$userdata['user_loginname']}' OR user_name='{$userdata['user_name']}'"))
|
if ($uid = $sql->retrieve("user", "user_id", "user_xup='" . $sql->escape($this->userId()) . "' " . $insert . " OR user_loginname='{$userdata['user_loginname']}' OR user_name='{$userdata['user_name']}'"))
|
||||||
{
|
{
|
||||||
// $this->login($redirectUrl); // auto-login
|
// $this->login($redirectUrl); // auto-login
|
||||||
e107::getUser()->loginProvider($this->userId());
|
$result = e107::getUser()->loginProvider($this->userId());
|
||||||
|
|
||||||
|
if (!$result)
|
||||||
|
{
|
||||||
|
e107::getMessage()->addError("user_name already exists but doesn't have a matching user_xup");
|
||||||
|
}
|
||||||
|
|
||||||
if ($redirectUrl)
|
if ($redirectUrl)
|
||||||
{
|
{
|
||||||
e107::getRedirect()->redirect($redirectUrl);
|
$this->redirectAndForwardMessages($redirectUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
@@ -1657,7 +1662,7 @@ class e_user_provider
|
|||||||
{
|
{
|
||||||
if ($redirectUrl)
|
if ($redirectUrl)
|
||||||
{
|
{
|
||||||
e107::getRedirect()->redirect($redirectUrl);
|
$this->redirectAndForwardMessages($redirectUrl);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user