Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Profile pictures don't persist after logoff/re-login
Hello,
I'm having a problem with a jsConnect-configured Vanilla forum not persisting profile pictures after the user logs off.
I can successfully assign a profile picture, and it remains active until a logoff. Then it reverts to blank.
The forum is set to require a login in order to view posts, and it uses an external authentication/registration (exclusively) via jsConnect.
Any ideas as to why this might be happening?
Cheers,
Michael
Tagged:
0
Comments
Does the image return after logging in again or is it just gone?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
It's just gone
Can you say how you assigned a profile pic? what method did you use? is this v2.0 or 2.1 ?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Certainly! It's v2.0.18.4, and profile pics're assigned by going to one's profile (e.g. by clicking one's name in the navigation bar), then clicking "Change My Picture", and uploading one.
I should note that in the activity list on one's profile, the picture change entry remains across a logout/log-in, but the profile picture itself vanishes.
when logged out inspect the image element in discussion for the profile pic.
share the code here
then do the same when logged in and share the code here
There was an error rendering this rich post.
Certainly, and cheers:
Logged in, immediately after setting profile pic:
Logged out (looks the same when logged back in again); showing Gravatar because Gravatar plugin enabled:
I might add that the "Photo" column from the GDN_User table seems to get cleared upon login (but not logout, which doesn't explain why the photo doesn't persist after a logout).
are you certain the "Photo" column from the GDN_User table table changes? you checked it with phpmyadmin.
just wanted you to verify, or was it an assumption.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
try disabling gravatar plugin see what happens
There was an error rendering this rich post.
Absolutely certain, yep (Sequel Pro, not phpMyAdmin, but same thing).
Tried disabling Gravatar, but the same thing happens - except no image is shown at all after logout/relogin, rather than showing the gravatar icon.
I'm convinced this is something to do with the jsConnect thing, perhaps a bug with the way the user state is synced, but don't have the time to go through the source and find it right now.
wild guess -- something happening here. class.jsconnect.plugin.php
$Form->SetFormValue('Photo', GetValue('photourl', $JsData, ''));
or this
if (!$User['PhotoUrl'] && function_exists('UserPhotoDefaultUrl')) {
$User['PhotoUrl'] = Url(UserPhotoDefaultUrl(Gdn::Session()->User), TRUE);
UserPhotoDefaultUrl is picked up from gravatar I believe.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine is right.
Please look here: http://vanillaforums.org/discussion/comment/174728
What actually happens is: jsConnect overwrites the avatar each time you login. If you do not provide an avatar link, it deletes the link to it. By making the changes I mention in my post, you prevent Vanilla from modifying your avatar picture at login.
@halfcat to the rescue. I don't use jsconnect but those lines looked like the culprits.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Ah, bravo! Lovely work, thanks heaps!