Advertisement
Stratician

Signup Class

Feb 4th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.49 KB | None | 0 0
  1. <?php
  2.  
  3. class Signup {
  4.    
  5.     // Properties associated with the user registration form
  6.  
  7.     protected $username;
  8.     protected $email;
  9.     protected $password;
  10.  
  11.     public function __construct($username, $email, $password)
  12.     {
  13.         $this->username = $username;
  14.         $this->email = $email;
  15.         $this->hashPass($password);
  16.     }
  17.  
  18.     // Create and store a hash from the user's submitted password
  19.  
  20.     protected function hashPass($hashedPass)
  21.     {
  22.         $this->password = password_hash($hashedPass, PASSWORD_DEFAULT);
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement