Replace Gravatar

twisted1919

Administrator
Staff member
I have just added two new filter hooks so from next version you will be able to do something like this from an extension:
PHP:
Yii::app()->hooks->addFilter('customer_get_gravatar_url', function($currentAvatarUrl, $customer, $size){
    return '//www.gravatar.com/avatar/'.  md5($customer->email) .'?d=identicon&s=' . $size;
});
Yii::app()->hooks->addFilter('user_get_gravatar_url', function($currentAvatarUrl, $user, $size){
    return '//www.gravatar.com/avatar/'.  md5($user->email) .'?d=monsterid&s=' . $size;
});
But just from next version...
 
Top