Jump to content

Cookies - When to use them


Kemik

Recommended Posts

Hello,

 

I'm making a league/ladder website where player's sign up, join a clan (group of players), or create a clan of their own.

 

I've already created the user management side of things where users can sign up, edit their profile and I (as an admin) can also edit and delete their profile. Now I'm on to the clan management side.

 

I've made the page where logged in users can create a clan, I approve the clan and then the clan shows as active. However, I'm now stuck on a few things.

 

After they create a clan their user ID is added to a separate database table which links their user ID with the clan ID. This means other users can then join and be given the same clan ID.

  • When the user creates the clan should I create a cookie on their machine which says they are part of X clan?
  • Should I then also create a cookie on their machine saying they are the clan leader (in future this will give them access to edit their clan details which normal clan members cannot do).
  • When a user logs in, as well as creating a user ID cookie (so they can access registered users only parts of the site) should I also create a cookie showing which clan they are part of, and again if they are a clan leader?
  • Finally, on a different matter. When I login the database checks my user id to see if I have been flagged as an admin in the table. If yes, it creates a cookie on my machine which non-admins don't receive. Is this generally how admin systems work?

 

I know it's a bit complicated to understand if you don't know how clans work but I've tried to simplify it as much as possible.

 

Please ask if you have any questions which will help you help me :)

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.