servermgrv2 init...
This commit is contained in:
parent
21cf0eca16
commit
e901dfdeb7
@ -4,10 +4,8 @@ namespace App\Entities;
|
||||
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
class CommonEntity extends Entity
|
||||
abstract class CommonEntity extends Entity
|
||||
{
|
||||
public function getTitle()
|
||||
{
|
||||
return "CommonEntity";
|
||||
}
|
||||
abstract public function getPrimaryKey();
|
||||
abstract public function getTitle();
|
||||
}
|
||||
|
||||
@ -14,22 +14,6 @@ class HPILOEntity extends CommonEntity
|
||||
{
|
||||
return $this->attributes['uid'];
|
||||
}
|
||||
public function getID()
|
||||
{
|
||||
return $this->attributes['id'];
|
||||
}
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->attributes['passwd'];
|
||||
}
|
||||
public function getIP()
|
||||
{
|
||||
return $this->attributes['ip'];
|
||||
}
|
||||
public function getPort()
|
||||
{
|
||||
return $this->attributes['port'];
|
||||
}
|
||||
public function getTitle()
|
||||
{
|
||||
return "{$this->attributes['customer']} {$this->attributes['model']}";
|
||||
|
||||
@ -18,20 +18,8 @@ class UserEntity extends CommonEntity
|
||||
{
|
||||
return $this->attributes['name'];
|
||||
}
|
||||
public function getEmail()
|
||||
{
|
||||
return $this->attributes['email'];
|
||||
}
|
||||
public function getRole()
|
||||
{
|
||||
return $this->attributes['role'];
|
||||
}
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->attributes['passwd'];
|
||||
}
|
||||
public function getEncryptedPassword(string $password)
|
||||
{
|
||||
return password_hash($password, PASSWORD_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,24 +14,8 @@ class UserSNSEntity extends CommonEntity
|
||||
{
|
||||
return $this->attributes['uid'];
|
||||
}
|
||||
public function getUserUID()
|
||||
{
|
||||
return $this->attributes['user_uid'];
|
||||
}
|
||||
public function getSite()
|
||||
{
|
||||
return $this->attributes['site'];
|
||||
}
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->attributes['name'];
|
||||
}
|
||||
public function getEmail()
|
||||
{
|
||||
return $this->attributes['email'];
|
||||
}
|
||||
public function getStatus()
|
||||
{
|
||||
return $this->attributes['status'];
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ class GoogleAdapter extends Adapter
|
||||
if (is_null($snsEntity)) {
|
||||
$snsEntity = $this->getUserSNSModel()->create($this->getSiteName(), $result);
|
||||
}
|
||||
if (!$snsEntity->getUserUID()) {
|
||||
if (!$snsEntity->user_id) {
|
||||
throw new \Exception($this->getSiteName() . "의{$result['email']}:{$result['name']}님은 아직 사용자 지정이 되지 않았습니다.");
|
||||
}
|
||||
if ($snsEntity->getStatus() !== DEFAULTS['STATUS']) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user