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 #187
This commit is contained in:
parent
9dc9724e15
commit
e0235fda8b
6 changed files with 53 additions and 15 deletions
app/Http/Controllers
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue