avatar
Lab02-userclass.php

Guest 1.7K 20th Mar, 2021

WebAssembly 1.12 KB
<?php //IDEA:
require_once("helpers.php");

class User
{
    private $username;
    private $userEmail;
    private $userID;
    private $status;

    public function __construct($newUser, $email)
    {
        $this->username = $newUser;
        $this->userEmail = $email;
        $this->status = 1;
        $this->userID = GetNextUserID();
    }
    public function __destruct()
    {
        $this->username = NULL;
        $this->userEmail = NULL;
        $this->status = NULL;
        $this->userID = NULL;
    }
    public function GetUserName()
    {
        return $this->username;
    }
    public function GetUserEmail()
    {
        return $this->userEmail;
    }
    public function GetuserID()
    {
        return $this->userID;
    }
    public function GetUserStatus()
    {
        return $this->status;
    }
    public function SetUserStatus($input){
        if($input > 1 || $input < 0){
            return false;
        }
        $this->status = $input;
        return true;
    }
}
?>
WebAssembly
Description

No description

To share this paste please copy this url and send to your friends
RAW Paste Data