$user contains Custom Fields?

Marcus

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!
 
In that very file there is this:
PHP:
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. :-)
 
Top Bottom