Use users gravatar

This commit is contained in:
James Brooks
2014-12-04 15:36:19 +00:00
parent 0ed4b553e4
commit 9f3589836f
2 changed files with 7 additions and 4 deletions

View File

@@ -33,5 +33,8 @@ class User extends Eloquent implements UserInterface, RemindableInterface {
$this->attributes['password'] = Hash::make($password);
}
public function getGravatarAttribute($size = 200) {
return 'https://www.gravatar.com/avatar/' . md5($this->email) . '?size=' . $size;
}
}

View File

@@ -9,7 +9,7 @@
<title>{{ isset($pageTitle) ? $pageTitle : Setting::get('app_name') }} | Cachet</title>
<link rel="stylesheet" href="{{ elixir('css/all.css') }}">
<link rel="stylesheet" href="{{ elixir('css/all.css') }}">
<script src="{{ elixir('js/all.js') }}"></script>
</head>
<body class="dashboard">
@@ -37,12 +37,12 @@
<div class="profile">
<div class="avatar pull-left">
<a href="#">
<img src="https://www.gravatar.com/avatar/215db0deb447d97a916ea780771b8c64?size=200" alt="">
<img src="{{ Auth::user()->gravatar }}" alt="">
</a>
</div>
<div class="profile pull-left">
<div class="username">{{Auth::user()->username }}</div>
</div>
<div class="username">{{ Auth::user()->username }}</div>
</div>
</div>
<ul>
<li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>