Forum Replies Created
-
No but once I save the user to the database I get the user ID so I can use it to attach files, images or anything to a user but couldn’t find any solution for attaching avatars to a user so buddy press can ready it
I am not uploading any image I’m using a script that gets random users from a RESTFul API then register it as a user that’s all, in the API results I have a url of the avatar I use
wp_download
and other functions to upload the image from its URL, now I miss just the thing about attaching it to the user, I have all things settled.not showing the avatar but instead I want to attach the avatar to a specific user so buddypress will take care of showing it,
the only problem is that it depends on a $_FILES variable
this means that I can use the function if I had a form, else I can’t because the mother Class has needs as argument the file from ($_FILE) and the name of the form which i don’t have.
I have got something great that I have been missing all the time ‘BP_Attachment’ is the right class to use if you want to upload an avatar, the only problem is that it depends on a
$_FILES
variable.thanks but couldn’t find the meta used for avatars, I may be wrong so if you know please what is being updated to show avatar for each profile please tell me.
anyone got an idea?
separated sorry, but the birthday (datebox) still not working
he store its link in the meta, but don’t know which function should I use as I couldn’t find any, for datebox I used the right function yet not stored, why?
all i want to know is how the avatar are set in the user meta, because I have an external image url and want to set it in the meta but don’t know how they do it in buddypress, i have red all the files in buddypress plugin, but nothing helps. For the field datebox also I don’t know why it is not working I am sure my data is good but why it is not showing ?
yes checked the DB and I can see my users with all data except birthday and avatar that’s all
the user ID and DATE, works fine
$random_user = wp_insert_user( $userdata ) ;
this is how i get the user ID its working fine only birthday and avatar which are my problem, I can’t set a date or an avatar from an external link.
I have used an API to generate random users then I save it as a buddypress user.
And $user_id was a mistake I use instead$random_user
but it’s not working anyways.