Guest User

Untitled

a guest
Sep 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2.    
  3.  
  4.     class User extends MysqlActiveRecord{
  5.             private $name;
  6.             private $lastName;
  7.             private $email;
  8.             private $password;
  9.             private $creationDate;
  10.             private $apiKey;
  11.            
  12.             public function __construct(){
  13.                 parent::__construct($this);
  14.                    
  15.             }
  16.             public function setEmail($email){
  17.                 $this->email = $email;
  18.             }
  19.  
  20.             public function getEmail(){
  21.                 return $this-email;
  22.             }
  23.  
  24.             public function isAuthenticated(){
  25.                 if(Session::get('is_logged_in')):
  26.                     return true;
  27.                 else:
  28.                     return false;
  29.                 endif;
  30.             }
  31.  
  32.     }
Add Comment
Please, Sign In to add comment