0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-05-21 23:38:39 +00:00

Made registration gravatar/email requests fail gracefully

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

Closes 
This commit is contained in:
Dan Brown 2016-09-17 21:33:55 +01:00
parent 9dc9724e15
commit e0235fda8b
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
6 changed files with 53 additions and 15 deletions
app/Http/Controllers

View file

@ -3,6 +3,7 @@
namespace BookStack\Http\Controllers;
use BookStack\Activity;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
@ -100,9 +101,14 @@ class UserController extends Controller
// 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) {
\Log::error('Failed to save user gravatar image');
}
}
return redirect('/settings/users');