MyBB Community Forums

Full Version: Integration.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If a profile is updated, how can I find out what has been submitted so that I can possibly update other tables with the same data.
You will have to re for the new profile..

global $db,
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."users WHERE uid='$uid'");
$user = $db->fetch_array($query);

That code in the profileUpdated function should fetch the new profile and return it as an array.

Chris.
global $db,
comma or semicolon?

I can use the same code that you posted for the password and email change right?

What about account registration, how would I get ahold of that data?

What about custom profile fields?
Bleh. semicolon sorry.

Quote:I can use the same code that you posted for the password and email change right?
Yep

Quote:What about account registration, how would I get ahold of that data?
Using the same thing, I believe the uid is passed to it?

Quote:What about custom profile fields?
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."userfields WHERE ufid='$uid'");
$profilefields = $db->fetch_array($query);
Thanks Chris.

But how would I get the password the user registered with (not MD5ed). Would I just do a global $password in the function?
You can't get the password the user registered with. MD5 is irreversible and the password isn't stored elsewhere.
I meant on registration
How would I check the forum of the thread/post in the replyPosted or threadPosted is a forum where the post count is incremented or not?
Modify inc/integration.php so that accountCreated takes the clear text password as a second parameter. Then look for accountCreated($uid) in member.php and replace it with accountCreated($uid, $password).

I'm sure something similar could be done for the plugins.
This was the pre-plugin age.