Topic-icon K2 User profile image upload

Active Subscriptions:

None
9 years 4 months ago #50216 by matgray87
Hi,
As before, I'm using the K2 registration with JFB Connect... which I believe overrides the normal K2 registration / profile...
JFB connect works great, but does it overwrite /administrator/components/com_k2/models/user.php in any way?
I'm trying to change the file so that any photo which is uploaded in the default user method, i.e. not via JFB connect is cropped to a square (which would normally be controlled in that file).

I've changed it to:
$handle = new Upload($file['image']);
            if ($handle->uploaded)
            {
                $handle->file_auto_rename = false;
                $handle->file_overwrite = true;
                $handle->file_new_name_body = $row->id;
                $handle->image_resize = true;
                $handle->image_ratio_y = true;
                $handle->image_x = $params->get('userImageWidth', '100');
                $handle->Process($savepath);
                $handle->Clean();
            }

but that file doesn't seem to be making any difference at all whatever I do to it, even if I delete it!

Can you help please?

Thanks,
Matt
The topic has been locked.
Support Specialist
9 years 4 months ago #50226 by alzander
We don't modify the K2 files in any way whatsoever. We use our own methods to download avatars and prepare them for K2. Our code to set the avatar can be found in the /plugins/socialprofiles/k2/k2.php file around line 71. The code looks very similar to what you have above, in case you want to make a similar for whatever you're doing there.

Sorry I can't be more of a help, but I don't think JFBConnect is what's preventing your change from taking effect.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 4 months ago #50330 by matgray87
Hi - thanks for your answer...
I'm sure I'll find another way round.
The topic has been locked.