Skip to content

Commit

Permalink
Fixed the avatar issue dead link.
Browse files Browse the repository at this point in the history
  • Loading branch information
rasseljandavid committed Jul 26, 2011
1 parent 70926fe commit 5330b5f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
23 changes: 23 additions & 0 deletions conf/extensions/avatar.defaults.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

##################################################
#
# Copyright (c) 2004-2011 OIC Group, Inc.
# Written and Designed by James Hunt
#
# This file is part of Exponent
#
# Exponent is free software; you can redistribute
# it and/or modify it under the terms of the GNU
# General Public License as published by the Free
# Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# GPL: http://www.gnu.org/licenses/gpl.txt
#
##################################################

if (!defined('DEFAULT_AVATAR')) define('DEFAULT_AVATAR', URL_FULL . "framework/modules/users/avatars/avatar_not_found.jpg");


?>
7 changes: 6 additions & 1 deletion framework/modules/users/controllers/usersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,13 @@ public function edituser() {
flash('error', 'You do not have the proper permissions to edit this user');
expHistory::back();
}

$active_extensions = $db->selectColumn('profileextension','classname','active=1', 'rank');

//If there is no image uploaded and the system is not in the development mode, use the default avatar
if(empty($u->image) && !DEVELOPMENT) {
$u->image = DEFAULT_AVATAR;
}

assign_to_template(array('edit_user'=>$u, 'extensions'=>$active_extensions,"userkey"=>expSession::get("userkey")));
}

Expand Down

0 comments on commit 5330b5f

Please sign in to comment.