Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. $user = new User();
  2. $login = $user->login(Input::get('username'), Input::get('password'));
  3.  
  4. public function login($username = null, $password = null) {
  5. $user = $this->find($username);
  6. print_r($this->_data);
  7.  
  8.  
  9. if($user) {
  10. if ($this->data()->password === Hash::make($password, $this->data()->salt)) {
  11. echo 'OK!';
  12. } else {
  13. echo '<br>';
  14. echo 'This data password:';
  15. var_dump($this->data()->password);
  16.  
  17. }
  18. }
  19.  
  20. return false;
  21. }
  22.  
  23. Array ( [0] => stdClass Object (
  24. [id] => 32
  25. [email] => xxx
  26. [fname] => xxx
  27. [lname] => xxx
  28. [username] => user
  29. [password] => 295c7ac2341f2688838148728d450a5562933d5fbea6d2a9e9fec2eeab29dd84
  30. [salt] => 4ÌxÇd”0ð&ÞðÈßr¡–k$ «%•¦S?~d$r
  31. [name] => xxx
  32. [joined] => 2016-09-28 07:10:32
  33. [grouptype] => 1 ) )
  34.  
  35. Array ( [0] => stdClass Object
  36.  
  37. stdClass Object ( [id] =>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement