Example #1
0
 /**
  * Construct a new User object
  *
  * @param array $user
  * @param \PDO  $db
  */
 public function __construct(array $user, \PDO $db)
 {
     $this->db = $db;
     parent::__construct($user, \ArrayObject::ARRAY_AS_PROPS);
 }
Example #2
0
 /**
  * Create a new user using an MD5 hash
  *
  * @param string $username username of the user
  * @param string $md5 MD5 hash of the user password
  */
 public function __construct($username, $md5)
 {
     parent::__construct($username);
     $this->md5 = $md5;
 }
Example #3
0
 /**
  * Create a new user using a plain text password
  *
  * @param string $username username of the user
  * @param string $plain plain text user password
  */
 public function __construct($username, $plain)
 {
     parent::__construct($username);
     $this->plain = $plain;
 }