improve register endpoint
Questo commit è contenuto in:
parent
3104948aa6
commit
aca7812bad
1 ha cambiato i file con 4 aggiunte e 1 eliminazioni
5
api.php
5
api.php
|
|
@ -7569,7 +7569,10 @@ namespace Tqdev\PhpCrudApi\Middleware {
|
|||
$passwordColumnName = $this->getProperty('passwordColumn', 'password');
|
||||
$passwordColumn = $table->getColumn($passwordColumnName);
|
||||
$registerUser = $this->getProperty('registerUser', '');
|
||||
if ($path == 'register' && $registerUser) {
|
||||
if ($path == 'register') {
|
||||
if (!$registerUser) {
|
||||
return $this->responder->error(ErrorCode::AUTHENTICATION_FAILED, $username);
|
||||
}
|
||||
$data = json_decode($registerUser, true);
|
||||
$data = is_array($data) ? $data : [];
|
||||
$data[$usernameColumnName] = $username;
|
||||
|
|
|
|||
Caricamento…
Aggiungi tabella
Aggiungi collegamento
Crea riferimento in una nuova segnalazione