1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Made registration gravatar/email requests fail gracefully

* Extracted any email confirmation text into langs.
* Added new notification on confirmation email send fail.

Closes #187
This commit is contained in:
Dan Brown
2016-09-17 21:33:55 +01:00
parent 9dc9724e15
commit e0235fda8b
6 changed files with 53 additions and 15 deletions

View File

@ -2,6 +2,7 @@
use BookStack\Role;
use BookStack\User;
use Exception;
use Setting;
class UserRepo
@ -84,9 +85,14 @@ class UserRepo
// Get avatar from gravatar and save
if (!config('services.disable_services')) {
$avatar = \Images::saveUserGravatar($user);
$user->avatar()->associate($avatar);
$user->save();
try {
$avatar = \Images::saveUserGravatar($user);
$user->avatar()->associate($avatar);
$user->save();
} catch (Exception $e) {
$user->save();
\Log::error('Failed to save user gravatar image');
}
}
return $user;