mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
* Fixed missing oauth tables during setup. * Fixed missing manager_id and department_id
This commit is contained in:
parent
465b69516d
commit
a975117eaf
|
@ -320,14 +320,14 @@ abstract class Importer
|
||||||
|
|
||||||
// No Luck, let's create one.
|
// No Luck, let's create one.
|
||||||
$user = new User;
|
$user = new User;
|
||||||
$user->first_name = $user_array['first_name'];
|
$user->first_name = $user_array['first_name'];
|
||||||
$user->last_name = $user_array['last_name'];
|
$user->last_name = $user_array['last_name'];
|
||||||
$user->username = $user_array['username'];
|
$user->username = $user_array['username'];
|
||||||
$user->email = $user_array['email'];
|
$user->email = $user_array['email'];
|
||||||
$user->manager_id = $user_array['manager_id'];
|
$user->manager_id = $user_array['manager_id'] ?? null;
|
||||||
$user->department_id = $user_array['department_id'];
|
$user->department_id = $user_array['department_id'] ?? null;
|
||||||
$user->activated = 1;
|
$user->activated = 1;
|
||||||
$user->password = $this->tempPassword;
|
$user->password = $this->tempPassword;
|
||||||
|
|
||||||
if ($user->save()) {
|
if ($user->save()) {
|
||||||
$this->log('User '.$user_array['username'].' created');
|
$this->log('User '.$user_array['username'].' created');
|
||||||
|
|
Loading…
Reference in a new issue