• (2 Pages)
  • +
  • 1
  • 2

User Authentication Class Rate Topic: ****- 2 Votes

#16 cxn  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 10-March 12

Posted 20 April 2012 - 02:45 AM

Hello, thank you for this great article - it's exactly what I was looking for!

I'm going to be working my head around getting the database stuff in there. I'm fairly new to PDO as well so I hope I'm going to do it right. Before this I want to make sure the rest is working.
I was wondering if the following piece of code needs editing:

<?php

class Auth {
	private $_siteKey;

	public function __construct()
  	{
		$this->siteKey = 'my site key will go here';
	}




With what do I replace 'my site key will go here' ? Should I use the randomString function? I'm new to OOP so this might be a very very stupid question heh.

Thanks in advance
Was This Post Helpful? 0
  • +
  • -

#17 sampras  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 19-February 12

Posted 28 April 2012 - 12:31 PM

Hi thanks for the greate article, is there a reason why you have avoided using cookies?
Was This Post Helpful? 0
  • +
  • -

#18 E_Geek  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 45
  • View blog
  • Posts: 231
  • Joined: 20-February 11

Posted Yesterday, 11:35 AM

Hey, sorry for the very late reply, I've had a very hectic three month period.

Cxn, if you are still having trouble, you would change that string with a (preferably) random 'site key' that will not change after you're website is live.

Sampras - I guess I find sessions easier to work with for one. The main reason is that cookies are stored on the clients machine, and can be manipulated by a user incredibly easily. Sessions on the other hand are a server stored mechanism, offering you greater control to what the user can manipulate.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2