luca90
Total posts: 65
04 May 2015 20:23

Hi,

i have a question:

how can i setting the record submission with public access and after creation of this enable the registration/login and associate the new record to this user?

Last Modified: 07 Jul 2015


Sergey
Total posts: 13,748
06 May 2015 09:50

I had this system on AngelDesk support desk when we had that. I wanted to add it to Coablt too. But i had no chance.

There s only once way to do it. You need to save something in cookies and identify every created record with that cookie. After registration, check if this user has a cookie and if yes set all articles to that user.

Cookies are not very reliable so you have to duoble it in sesion and local storage.


luca90
Total posts: 65
06 May 2015 16:04

It operation very long to reproduce. There are some code or your plugin (also in beta) to make this?


Sergey
Total posts: 13,748
07 May 2015 14:05

There is access_key for every article. This might be used as identifier assosiated with cookie.


luca90
Total posts: 65
07 May 2015 15:42

Hi,

yes i have viewed the access_key. If i save this value with cookies how can i associate this record to the new logged user?


Sergey
Total posts: 13,748
12 May 2015 10:57

You have to create unique cookie for user. For example

my_ses_d4s6DG650sgm7Dio = 1

You have to create this cookie only if there is not cookie which starts with your unique prefix my_ses_. Now you know that this user will always work with this cookie. He might create few articles. So you have to assosiate access_key and cookie. For example create DB table and on every article add, insert there user unique cookie and access_key.

Later when user logged in you check for your cookie. If it exists, you select all access_key assosiated with this cookie, set this user to those articles and delete cookie.


luca90
Total posts: 65
29 Jun 2015 11:20

Have you some plugin to this? a guide or other becouse is hard to associate a record (with access_key) to a user.

Please help me to solve this.

Thanks, Luca


Sergey
Total posts: 13,748
01 Jul 2015 15:47

I could create this plugin as custom deevlopment. That would be $100 approx.


luca90
Total posts: 65
01 Jul 2015 20:20

Hi,

thanks for the offer but it is expensive. I try to personalize the script. If i have problem i write for help in this post.

Thanks, Luca


Sergey
Total posts: 13,748
07 Jul 2015 09:30

You need DB table that can store cookie ID and record ID.

Now in your plugin check if special cookie exists and if not set it but only if user is public.

Then on user login event check usr coockie and compare it in the table, if there are records, set that user to those articles and delete records.

And another logic blick is to save record ID. Use after article save event of cobalt to assosiate article ID with user cookie.

Powered by Cobalt