-1

I have some admins for editing posts. I want ,when an admin is editing a post ,lock that post to prevent editing by other admins so I need a lock field from 0 to 1 and also I need to set lock_time for 30 minutes . because maybe that admin go out without click in "update" button . so I need set my lock field from 1 to 0 after 30 minutes again.

so for this I want to use session but I dont know how can I set a lifetime for a special session.because lifetime field in session.php file is for all session but I want to expire just one.

thanks for time

saha
  • 221
  • 1
  • 5
  • 13

1 Answers1

0

For me you can use a task, lock the post and create a task with cron, otherwise think different approach like this post Prevent two users from editing the same data

Community
  • 1
  • 1
stukdev
  • 198
  • 1
  • 4
  • 16