Skip to:
Content
Pages
Categories
Search
Top
Bottom

Message Globals problem – preventing welcome message from sending

  • Avatar of shedmore
    shedmore
    Participant

    @shedmore

    Ok here is the deal – I am modifying the welcome plugin becuase it doesnt work with the fbconnect plugin…and it seems to require email authorization before it shoots off the initial welcome message….which my site won’t require – in effect preventing the welcome series of functions from firing.

    I have echo’d the order of “do_actions” for purposes of tracking down my problem.

    //////

    Action is : user_register

    Action is : fbc_insert_user

    Action is : xprofile_data_before_save

    Action is : xprofile_data_after_save

    function installed Inside Messages() – inside Send Function()

    Action is : messages_message_before_save

    Action is : xprofile_data_before_save

    Action is : xprofile_data_after_save

    function installed Inside Messages() – inside Send Function()

    Action is : messages_message_before_save

    Action is : fb_done_inserting

    Action is : set_auth_cookie

    Action is : set_logged_in_cookie

    Action is : set_current_user

    Action is : xprofile_data_before_save

    Action is : xprofile_data_after_save

    Action is : messages_message_before_save

    Action is : bp_core_setup_globals

    Action is : bp_activity_setup_globals

    Action is : bp_blogs_setup_globals

    Action is : bp_forums_setup

    Action is : friends_setup_globals

    Action is : groups_setup_globals

    Action is : messages_setup_globals

    ////////

    Now you can see (above) where I echo’d the attempt to send a welcome message. (it says function installed Inside Messages() – inside Send Function() ) — basically thats a series of echos that I embeded into the various functions all the way to “send” which actuall sends the message to the database.

    Here is the problem – Unless I setup the messages_new_message() to go AFTER the last do_action above (the messages_setup_globals) than I can’t send it off.

    But doing it AFTER that seems a little clunky in that the initial registration steps are so far above it in the process of loading.

    Any ideas for how to approach initial actions (only to occur on registration) but that require all of the globals to be set that way you have access to the different activity/messaging/etc…functions

    Does that make sense? Trying to figure out the right way to solve it

    Once I add the messages_new_message after the message globals all works as intended..so I know my hooks are all setup correctly (functionaly) but its rather the “timeline” of loading these globals and classes that is throwing it off

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hmm, I probably do need to check the email text has been updated to match BP 1.1.1. I don’t know about the other stuff but i’ll try to get a release done.

    Try Welcome Pack 1.41.

    Avatar of shedmore
    shedmore
    Participant

    @shedmore

    Wow thanks…I will try as soon as I get back to the local computer hosting my test dev. What seems to be happening (in short) is that becuase my users use facebook to login/register…it never goes through the “activation” email scenario….and becuase it registers a new user (and activates them) BEFORE those messages_global are set – the send message function fails.

    I tried reording the load_plugin order of the core and the message globals so that they would boot before, but once I did that it screwed up other things (like the order they need to be in to boot through the various functions in buddypress)..so I reverted, and have sense been trying to figure out how to maybe Trigger the “activation” silently in the registration process so that the email verification is not necissary.

    I will try the new plugin and report back

    Avatar of shedmore
    shedmore
    Participant

    @shedmore

    Hey DJ Paul

    I noticed that you added bp_core_account_activated hook which should work in most cases, but like I said (in my particular case) I skip over the activation via the buddypress fbconnect plugin. It inserts the user directly.

    Maybe there is a way for me to call that activation once the facebook user is authenticated? Do you know of a way to trigger that whole authorization process without actually making the user click on an email?

    That way it basicaly works like this

    1. User registers with Facebook conenct button

    2. Facebook sends back userinfo (via the api) – thats working currently

    (and here is where I am fuzzy)

    3. Take the fb information and trigger the account activation “automatically” …effectively bypassing the need for a “key”

    Or

    Is there another hook I can grab onto somewhere in the process beyond bp_core_account_activated that would work only on INITIAL Registration…but still after all globals are loaded (to ensure the messaging will work)

    Any ideas?

    Thanks again for the help!

    Avatar of shedmore
    shedmore
    Participant

    @shedmore

    Turned out to be a fairly simple fix in the end… the facebook_init was loading to early, I changed the order of that to load after globals and added a few new calls ….and now its working great with your plugin!

    I will create a new post to explain what needs to be done to make sure both plugins (bp-facebook and welcome work togeather)

    Thanks for the help

    Cool, nice one.

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

You must be logged in to reply to this topic.