MyBB Community Forums

Full Version: Some infos for integrating MyBB with Drupal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

I would like to *try* to make a module that integrates mybb with drupal. The ideea is to use mybb to manage users and to allow those users to login on my drupal website. 'Cose is my first plugin for mybb, i'll need some informations from the more experimented members of the community Smile.
First I need to know the hooks for the following events:

- success login
- success logout
- success register
- success profile edit (username, password, email, signature, time zone changed)

Thanks in advance!
I'm also currently running a Drupal portal and a MyBB forum, so I really second and support superfane's idea here! Please help!
superfane Wrote:Hello,

I would like to *try* to make a module that integrates mybb with drupal. The ideea is to use mybb to manage users and to allow those users to login on my drupal website. 'Cose is my first plugin for mybb, i'll need some informations from the more experimented members of the community Smile.
First I need to know the hooks for the following events:

- success login
- success logout
- success register
- success profile edit (username, password, email, signature, time zone changed)

Thanks in advance!

- success login: $plugins->run_hooks("member_do_login_end"); or create a function called loggedIn and include member.php after the function. loggedIn function should accept the uid of the user logging in.
- success logout: $plugins->run_hooks("member_logout_end"); or create a function called loggedOut and include member.php after the function. loggedOut function should accept the uid of the user logging out.
- success register: $plugins->run_hooks("member_do_register_end");
- success profile edit:
-- Username: $plugins->run_hooks("usercp_do_changename_end"); / $plugins->run_hooks("usercp_do_changename_process");
-- Password: $plugins->run_hooks("usercp_do_password_end");
-- Email: $plugins->run_hooks("usercp_do_email_changed"); / $plugins->run_hooks("usercp_do_email_verify"); or a function called emailChanged that accepts the uid and the email before inluding usercp.php
-- Signature: $plugins->run_hooks("usercp_do_profile_end"); (success profile update)
-- time zone: $plugins->run_hooks("usercp_do_options_end"); (success options update)
Thanks for the infos and support. I think this week-end I'll start working and I'll keep you up to date. If anybody wants to help, please contact me!
Progress for this week-end:

- auto-register all the mybb users into drupal when the module is activated
- auto-login into drupal when a user login into mybb

I think it's working well Smile
ah, and also auto-update for specific feeds in drupal (I want to use this for updating the feed that retriews the latest threads when a new thread is posted)
Looking good, keep on the good work! Big Grin
If an admin is adding or changing a user, I can use the hooks provided by Tikitiki?
:o drupal intergration! i need this
superfane Wrote:If an admin is adding or changing a user, I can use the hooks provided by Tikitiki?

No, use the following for admin editing/adding a user:

Editing: $plugins->run_hooks("admin_users_do_edit");
Adding: $plugins->run_hooks("admin_users_do_add");
Pages: 1 2