How to get avatar url only

I have been digging around looking at elgg functions to try and work out how I can return the url of an avatar without the background image.

elgg_view_entity_icon returns

<img src="" alt="JohnnyD" title="JohnnyD" class="" style="background: url(;joindate=1308322600&amp;guid=736855&amp;size=large) no-repeat;"/>

but I just want to echo this bit;joindate=1308322600&amp;guid=736855&amp;size=large

Can anyone help me with this please?


Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking