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

@ -213,7 +213,7 @@ class ImageService
public function saveUserGravatar(User $user, $size = 500)
{
$emailHash = md5(strtolower(trim($user->email)));
$url = 'http://www.gravatar.com/avatar/' . $emailHash . '?s=' . $size . '&d=identicon';
$url = 'https://www.gravatar.com/avatar/' . $emailHash . '?s=' . $size . '&d=identicon';
$imageName = str_replace(' ', '-', $user->name . '-gravatar.png');
$image = $this->saveNewFromUrl($url, 'user', $imageName);
$image->created_by = $user->id;