Skip to:
Content
Pages
Categories
Search
Top
Bottom

Importing Users from XML but need help with images stored elsewhere

  • I am currently looking at BuddyPress for a client and need to move users from a old SQL Server DB to BuddyPress.

    I have exported them from the DB into XML, written a php script to read the XML and use wp_create_user( $user_name, $random_password, $user_email ); to create the users.

    Problem is all the users images are stored in separate folders on the site (userid is the folder name), any idea how I can get these images and store them in BP under that user ?

    Dave

Viewing 2 replies - 1 through 2 (of 2 total)

  • shanebp
    Moderator

    @shanebp

    What do you mean by ‘users images’ ? Avatars? Photos? Both?

    Avatars don’t have a database entry. They live here:
    /wp-content/uploads/avatars/[member_id]/[avatar file]
    But there needs to be a thumb and a full-size, and you’ll need to change the file names.
    And they may need to be jpg.
    For example:
    4f5664228829d-bpthumb.jpg
    4f5664228829dauto-bpfull.jpg

    Photos will require a plugin – and database entries.
    How you accomplish that will depend on which plugin you use.

    Sorry I should have mentioned, they are photos not avatars.

    Dave

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Importing Users from XML but need help with images stored elsewhere’ is closed to new replies.
Skip to toolbar