Advertisement
Stratician

Signup

Feb 3rd, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. class Signup {
  2.    
  3.     protected $username;
  4.     protected $email;
  5.     protected $password;
  6.  
  7.     public function __construct($username, $email, $password)
  8.     {
  9.         $this->username = $username;
  10.         $this->email = $email;
  11.         $this->password = $password;
  12.         $this->hashPass();
  13.     }
  14.  
  15.     protected function hashPass()
  16.     {
  17.         $password = $this->password;
  18.         $hashedPass = password_hash($password, PASSWORD_DEFAULT);
  19.         $this->password = $hashedPass;
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement