BuddyDev

Search

[Resolved] Auto Generate Gallery upon user registration

  • Participant
    Level: Initiated
    Posts: 6
    Matteo on #33131

    Hey Everyone,

    I am customising my BP profile page and added the mediapress plugin.
    Is there a way to automatically create an empty image gallery for a user upon registration and say name it ‘@username’-gallery? And is it possible to limit the available galleries per user to 1 (so they can’t create any new one?).

    Thanks for help all.

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2929
    Ravi on #33133

    Hello Matteo,

    Thank you for posting. Yes, it can be easily done I will update you soon with the code snippets to achieve this requirement.

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 6
    Matteo on #33150

    Thank you Ravi.
    I will be waiting for it

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2929
    Ravi on #33159

    Hello Matteo,

    Sorry for the delayed reply. Please try the following code. It will only allow one gallery per user.

    https://gist.github.com/raviousprime/9eb24ad9ca30a3639a453f2a3e8593b9

    Regards
    Ravi

  • Participant
    Level: Initiated
    Posts: 6
    Matteo on #33245

    Thank you Ravi, It works perfectly!

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 2929
    Ravi on #33248

    Hello Matteo,

    Thank you for the acknowledgement. I am glad that I could help.

    Regards
    Ravi

You must be logged in to reply to this topic.

This topic is: resolved