Skip to content
Snippets Groups Projects
Verified Commit 532a22bd authored by Damien's avatar Damien
Browse files

FEAT #289 admin user loginMode

parent c3b23a32
No related branches found
No related tags found
No related merge requests found
...@@ -133,6 +133,11 @@ class UserController ...@@ -133,6 +133,11 @@ class UserController
return $response->withStatus(400)->withJson(['errors' => 'User already exists']); return $response->withStatus(400)->withJson(['errors' => 'User already exists']);
} }
$logingModes = ['standard', 'restMode'];
if (!in_array($data['loginmode'], $logingModes)) {
$data['loginmode'] = 'standard';
}
UserModel::create(['user' => $data]); UserModel::create(['user' => $data]);
$newUser = UserModel::getByUserId(['userId' => $data['userId']]); $newUser = UserModel::getByUserId(['userId' => $data['userId']]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment