daily pastebin goal
6%
SHARE
TWEET

Signup Class

Stratician Feb 4th, 2016 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top