mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
No need to update the user again
This commit is contained in:
parent
396446a34b
commit
2df71be321
|
@ -783,7 +783,7 @@ class UsersController extends Controller
|
||||||
'last_name' => trim(e($row[1])),
|
'last_name' => trim(e($row[1])),
|
||||||
'username' => trim(e($row[2])),
|
'username' => trim(e($row[2])),
|
||||||
'email' => trim(e($row[3])),
|
'email' => trim(e($row[3])),
|
||||||
'password' => $pass,
|
'password' => bcrypt($pass),
|
||||||
'activated' => $activated,
|
'activated' => $activated,
|
||||||
'location_id' => trim(e($user_location_id)),
|
'location_id' => trim(e($user_location_id)),
|
||||||
'phone' => trim(e($row[5])),
|
'phone' => trim(e($row[5])),
|
||||||
|
@ -793,17 +793,10 @@ class UsersController extends Controller
|
||||||
'permissions' => '{"user":1}',
|
'permissions' => '{"user":1}',
|
||||||
'notes' => 'Imported user'
|
'notes' => 'Imported user'
|
||||||
);
|
);
|
||||||
|
//dd($newuser);
|
||||||
|
|
||||||
DB::table('users')->insert($newuser);
|
DB::table('users')->insert($newuser);
|
||||||
|
|
||||||
$updateuser = User::find($row[2]);
|
|
||||||
|
|
||||||
// Update the user details
|
|
||||||
$updateuser->password = $pass;
|
|
||||||
|
|
||||||
// Update the user
|
|
||||||
$updateuser->save();
|
|
||||||
|
|
||||||
|
|
||||||
if (((Input::get('email_user') == 1) && !config('app.lock_passwords'))) {
|
if (((Input::get('email_user') == 1) && !config('app.lock_passwords'))) {
|
||||||
// Send the credentials through email
|
// Send the credentials through email
|
||||||
|
|
Loading…
Reference in a new issue