Prevent duplicate keys
This commit is contained in:
parent
28558fe63f
commit
950527804a
@ -148,6 +148,9 @@ namespace Api\User {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prevent duplicate keys
|
||||||
|
$email = (!is_null($email) && empty($email)) ? null : $email;
|
||||||
|
|
||||||
$id = $this->insertUser($username, $email, $password);
|
$id = $this->insertUser($username, $email, $password);
|
||||||
if ($this->success) {
|
if ($this->success) {
|
||||||
$this->result["userId"] = $id;
|
$this->result["userId"] = $id;
|
||||||
@ -605,6 +608,8 @@ If the registration was not intended, you can simply ignore this email.<br><br><
|
|||||||
$password = $this->getParam("password");
|
$password = $this->getParam("password");
|
||||||
$groups = $this->getParam("groups");
|
$groups = $this->getParam("groups");
|
||||||
|
|
||||||
|
$email = (!is_null($email) && empty($email)) ? null : $email;
|
||||||
|
|
||||||
$groupIds = array();
|
$groupIds = array();
|
||||||
if (!is_null($groups)) {
|
if (!is_null($groups)) {
|
||||||
$param = new Parameter('groupId', Parameter::TYPE_INT);
|
$param = new Parameter('groupId', Parameter::TYPE_INT);
|
||||||
|
Loading…
Reference in New Issue
Block a user