Skip to content
Snippets Groups Projects
Commit 4050d798 authored by Michael Fairchild's avatar Michael Fairchild
Browse files

Force all profile icons to use icondirect.php

Default icons were being displayed differently in activity feeds
parent 1ddcb36d
No related branches found
No related tags found
4 merge requests!15WIP: Support WDN version 5.3,!8Update for elgg upgrade,!3Develop,!1Git fixes
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
function unl_avatars_init() { function unl_avatars_init() {
elgg_register_page_handler('pg', 'unl_avatars_pg_handler'); elgg_register_page_handler('pg', 'unl_avatars_pg_handler');
elgg_register_plugin_hook_handler('entity:icon:url', 'user', 'unl_avatars_alter_default_user_icons', 999);
} }
// Fire up the plugin initialization using the elgg handler // Fire up the plugin initialization using the elgg handler
...@@ -47,3 +48,9 @@ function unl_avatars_pg_profile($segments) { ...@@ -47,3 +48,9 @@ function unl_avatars_pg_profile($segments) {
forward('profile/'.$segments[1]); forward('profile/'.$segments[1]);
} }
function unl_avatars_alter_default_user_icons($hook, $type, $returnValue, $params) {
//Always point to the icondirect.php file
$value = 'mod/profile/icondirect.php?guid='.$params['entity']->guid.'&size='.$params['size'];
return $value;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment