Inserting user avatar in custom place as widget throws error

Hi. I want to add avatar photo with link to profile in custom menu, and do this in template or as a widget. However when I create my own widget


and use this.attach it throws error

I think there is no such data, but are there any way to fix this or the way I insert avatar is wrong?