File: /var/www/vhosts/creativefellows.nl/jhtaxatie.creativefellows.nl/classes/JhUser.php
<?php
class JhUser
{
public function __construct(array $data = [])
{
foreach($data as $el =>$val){
$this->$el = $val;
}
}
public function getUserId() {
return $this->user_id;
}
public function getHash() {
return $this->hash;
}
public function isSuperadmin() {
return ($this->role == 14) ? true : false;
}
public function getRole() {
switch($this->role){
case 1:
return "Verkoop";
break;
case 2:
return "Administrator";
break;
case 3:
return "GG medewerker";
break;
case 4:
return "Afdeling";
break;
case 14:
return "Superadmin";
break;
case 15:
return "Keurmeester";
break;
case 16:
return "Afdeling Huur";
break;
case 17:
return "Offertes testpanel";
break;
case 18:
return "Verkoop BE";
break;
case 19:
return "Sales Support";
break;
case 20:
return "INSA";
break;
case 22:
return "LS Sales Support";
break;
case 23:
return "AMIS";
break;
case 24:
return "TMFS";
break;
}
}
public function getUsername() {
return $this->username;
}
public function getFullname() {
return $this->full_name;
}
public function getPassword(){
return $this->hash;
}
public function getCompany(){
return $this->company;
}
public function getAddress(){
return $this->address;
}
public function getZip(){
return $this->zip;
}
public function getCity(){
return $this->city;
}
public function getPhone(){
return $this->phone;
}
public function getElementValue($element_name,$input_type)
{
return "";
switch($input_type)
{
case "password":
return "";
break;
case "upload":
return '<a href="/upload/'. $this->$element_name .'" target="_blank" />'. $this->$element_name .'</a>';
break;
default:
return $this->$element_name;
break;
}
}
public function getEmailAddress()
{
return $this->email;
}
}