Fix user photo upload.

The endpoint was not being passed properly to the included template

Fixes #1468
Merge pull request #1474 from maurizi/fix/1468/user-photo-upload

Fix user photo upload.