Skip to content
Snippets Groups Projects
Commit 8dba78c4 authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Return default user avatar if not set

parent 8aebe27a
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ def user(user_id):
def profile_avatar(user_id):
user = User.query.get_or_404(user_id)
if user.avatar is None:
abort(404)
return redirect(url_for('static', filename='images/default_avatar.png'))
if not user.is_public and not (user == current_user or current_user.is_administrator()):
abort(403)
return send_from_directory(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment