Hi there!
I bought the User module yesterday aftter pulling my hair for days with the EE speciality templates, and so far it’s made my life waaay easier!
BUT
One problem still
On my edit profile page, i can successfully change both standard and custom fields, but for some reason the photo and avatar uploads come with the “not authorised” error message.
I have checked and users are definitely allowed to do that, and it did work using the standard EE templates (probably the only thing that worked actually!).
Even as a superadmin i get the same error message…
I have also tried disabling secure forms and that didn’t resolve the problem…
I have multiple user:edit forms on the page but that doesn’t seem to be the issue either…
Any clue as to why it wouldn’t work?
Thanks in advance for your attention !
Stripped down code below:
{exp:user:edit return="/profile/edit" form_name="photo_form" form_id="photo_form"}
{if photo_filename!=""}
<div class="center"><img src="{photo_url}{photo_filename}" border="0" width="{photo_width}" height="{photo_height}" alt="My photo" /></div>
<div class="clear"></div>
<span class="margin_bottom_20" id='infophoto' style="display:none">› <a href="[removed]void();" onclick="toggle_visibility('photoupload','infophoto'); show_submit('uploadbtn');"><strong>Change your photo</strong>
</a></span>
{if:else}
<img src="/gfx/profile_placeholder.jpg" height="164" width="230" alt="Upload a photo now"/>
<span class="margin_bottom_20" id='infophoto' style="display:none">› <a href="[removed]void();" onclick="toggle_visibility('photoupload','infophoto') show_submit('uploadbtn');"><strong>Upload a photo now</strong></a></span>
{/if}
{if avatar_filename!=""}
<img src="{avatar_url}{avatar_filename}" border="0" width="{avatar_width}" height="{avatar_height}" title="{lang:my_avatar}" alt="{lang:my_avatar}" />
<span class="margin_bottom_20" id='infoavatar' style="display:none">› <a href="[removed]void();" onclick="toggle_visibility('avatarupload','infoavatar')"><strong>Change avatar</strong></a></span>
{if:else}
<img src="/gfx/avatar_placeholder.jpg" height="36" width="36" alt="Upload an avatar now"/>
<span class="margin_bottom_20" id='infoavatar' style="display:none">› <a href="[removed]void();" onclick="toggle_visibility('avatarupload','infoavatar')"><strong>Choose avatar</strong></a></span>
{/if}
<input type="file" name="photo_filename" size="20" class="input" style="margin:5px 3px 0 0" value="{photo_url}{photo_filename}"/>
<input type="file" name="avatar_filename" size="20" class="input" style="margin:5px 3px 0 0" value="{avatar_url}{avatar_filename}"/>
<input type='submit' class='submit' value='Upload' name="submit" style="margin:5px auto;"/>
{/exp:user:edit}
