#1
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.
Topic Starter
  • Eagle_f90
  • Rank: YAF Lover
  • Reputation:
    Friendly
    70%
  • Joined: 16/07/2014
  • Posts: 27
  • Thanks: 2 times
#2
I would probably piggy back the stored procedure that updates the username on the forum to execute a the sync that you're doing.
  • Zero2Cool
  • Rank: YAF Leader
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor for the Support Knight: Given to a community member who has assisted lots and lots of people!
  • Joined: 26/04/2011
  • Posts: 1,074
  •  Man  United States
  • Location: in a van down by the river
  • Thanks: 243 times
  • Was thanked: 101 time(s) in 92 post(s)
#3
What proc handles that?
Topic Starter
  • Eagle_f90
  • Rank: YAF Lover
  • Reputation:
    Friendly
    70%
  • Joined: 16/07/2014
  • Posts: 27
  • Thanks: 2 times
#4
Originally Posted by: Eagle_f90

What proc handles that?



Sorry, not sure, you'll have to check out the code.
  • Zero2Cool
  • Rank: YAF Leader
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor for the Support Knight: Given to a community member who has assisted lots and lots of people!
  • Joined: 26/04/2011
  • Posts: 1,074
  •  Man  United States
  • Location: in a van down by the river
  • Thanks: 243 times
  • Was thanked: 101 time(s) in 92 post(s)
#5
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.



  • bbobb
  • Rank: YAF Developer
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.Medal of Honor for a YAF Database Key Player: Holds the key to YAF database. Bow down!Medal of Honor for the Support King: Given for answering tons of support questions and generally helping the community.Medal of Honor for the Support Knight: Given to a community member who has answered lots of support questions.
  • Joined: 21/10/2008
  • Posts: 1,558
  •  Man  Russian Federation
  • Location: Moscow
  • Thanks: 51 times
  • Was thanked: 287 time(s) in 253 post(s)
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved