$user contains Custom Fields?


Well-known member
I want to rewrite stock avatars depending on custom user fields. I located protected static function _getDefaultAvatarUrl(array $user, $size) in Template/Helper/core.php and want to use the $user variable to check against checkbox custom user field "favoritemeal" which can be "potato", "pizza", "pasta" ... Do you know how to fetch the custom user field "favoritemeal" from $user?

Many thanks!


Active member
In that very file there is this:
public static function helperUserFieldValue($field, array $user = array(), $fieldValue = null)
It's normally used as a viewHelper in the template but I suppose you can use it for your own purpose. :)