We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Display profile picture | Forum

Topic location: Forum home » Support » General Questions
Youssef
Youssef Nov 7 '16
Hello,


I would like to display a user profile picture in a website... from the database i see that i can do that using the following tables:
ow_base_user <--> ow_base_avatar <--> ow_photo

the problem is there is a hash which is probably representing the picture url...if my guess is correct, which cryptographic hash are you using to decrypt it ?
Thank you !

The Forum post is edited by Youssef Nov 7 '16
ross Team
ross Nov 7 '16
Youssef, 


please provide more detaisl where do you want to display the photo. 

do you want to display the photo or avatar? 

the photo uses hash in the url as well and it is not being decrypted. 


The method is public function getPhotoUrl in ow_plugins/photo/bol/photo_dao.php

Youssef
Youssef Nov 8 '16
Thank you ross for the reply, the photo(the actual profile picture) will be displayed in a subdomain which is a none oxwall site but a simple php page in the same server
The Forum post is edited by Youssef Nov 8 '16
dave Leader
dave Nov 8 '16
Youssef to get the avatar you can do this if you know the userid. 


 $useravatar = BOL_AvatarService::getInstance()->getDataForUserAvatars(array($userid));
 $avatarpic = $useravatar[$userid]['src']; 


Then you can pass that via a get or post to the external oxwall php page. 

Youssef
Youssef Nov 8 '16
ok thank you so much ! i will try that