Skip to content

Commit

Permalink
Fix access to Staff creation panel. Closes #1741
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Sep 3, 2024
1 parent 917ff5a commit 42a39fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/admin/src/Models/Staff.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ public function getFullNameAttribute()
*/
public function getGravatarAttribute()
{
$hash = md5(strtolower(trim($this->attributes['email'])));
if (isset($this->attributes['email'])) {
$hash = md5(strtolower(trim($this->attributes['email'])));
}
else {
$hash = '';
}

return "https://www.gravatar.com/avatar/$hash?d=mp";
}
Expand Down

0 comments on commit 42a39fe

Please sign in to comment.