YAFLogo

Eagle_f90
  • Eagle_f90
  • 70% (Friendly)
  • YAF Lover Topic Starter
9 years ago
I have successfully gotten YAF to act as the membership backend for my web site but I had to set it up in a different database than the run that runs my main site. What I now need to do is sync the Username and DisplayName from the YAF User table into my database's User table. I only need to do the sync to keep the Displayname in sync so that when the user updates it via the forum it will be updated in my DB. Any thoughts on how best to do this.
Sponsor
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
9 years ago
I would probably piggy back the stored procedure that updates the username on the forum to execute a the sync that you're doing.
Eagle_f90
  • Eagle_f90
  • 70% (Friendly)
  • YAF Lover Topic Starter
9 years ago
What proc handles that?
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
9 years ago

What proc handles that?

Originally Posted by: Eagle_f90 

Sorry, not sure, you'll have to check out the code.

bbobb
  • bbobb
  • 100% (Exalted)
  • YAF Developer
9 years ago
You can write an after update trigger

create TRIGGER displayNameWatcher_trigger

ON yaf_User

AFTER UPDATE

AS

IF ( UPDATE (DisplayName) )

BEGIN

-- do something

END;

Or use Flags field to set an unused user flag like Flags = Flags | 128 and check it by Flags & 128 = 128

After this you should write something that checks the changes connects to other database and sets all back to normal in yaf database

like Flags = Flags ^ 128 You can write a servic that can check it without intruding into YAF source code too. There's a lot of options.

Hopefully, it helps.