WeStandWithUkraine

50 Posts
rtlehr
4 years ago
3
Topic

I'm using the user bridge as suggested when a new user registers.  What is the best way to relate the User ID with the associated Article ID created by the Bridge? I'd like to store the article id with the user.  I'm assuming I could do something with AfterStore, but not sure about the timing (if the article id will exist for the AfterStore to look for) or if there may be an already easy way to do this.

Thank you,

Ross

Get a Book for SEBLOD
1279 Posts
Bucklash
4 years ago
2
Level 1

Hi

The user id and article are already associated (in #__cck_core as pk and pkb respectively ... ir is it the other way round, can’t remember off top of head??).

In afterstore the article would have been created.... so you can use $config(‘pk’) to get id of user and from there get the pkb from #__cck_core... though depends why you really need to relate the article id with the user id twice me thinks :)

50 Posts
rtlehr
4 years ago
1
Level 2

Thank you, I did not know there was a table with them so closely related (learn something new all the time).  I'll just use that instead of reinventing the wheel.

Thank again,

Ross

1279 Posts
Bucklash
4 years ago
0
Level 3

I think looking at the db to see how seblod works can save a lot of hassle, saved me lots of times and is necessary for sql queries for select dynamic field and things like that

Get a Book for SEBLOD