1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-28 17:02:04 +03:00

Added command to add a new admin user

Closes #609
This commit is contained in:
Dan Brown
2018-01-28 18:09:26 +00:00
parent ec050a5eef
commit 59e809be16
5 changed files with 147 additions and 20 deletions

View File

@ -93,16 +93,7 @@ class UserController extends Controller
$user->roles()->sync($roles);
}
// Get avatar from gravatar and save
if (!config('services.disable_services')) {
try {
$avatar = \Images::saveUserGravatar($user);
$user->avatar()->associate($avatar);
$user->save();
} catch (Exception $e) {
\Log::error('Failed to save user gravatar image');
}
}
$this->userRepo->downloadGravatarToUserAvatar($user);
return redirect('/settings/users');
}