Xpressengine\User\UserInterface::getId PHP Method

getId() public method

Get the unique identifier
public getId ( ) : string
return string
    public function getId();

Usage Example

Beispiel #1
0
 /**
  * get log by name
  * 옵션을 사용하는 Counter 에서 로그를 확인 할 때
  * 등록된 옵션은 제외하고 확인하려고 할 수 있음
  *
  * @param string             $targetId target id
  * @param UserInterface|null $user     user instance
  * @return CounterLog|null
  */
 public function getByName($targetId, UserInterface $user = null)
 {
     if ($this->guest == true && ($user == null || $user instanceof Guest)) {
         return $this->newModel()->where('targetId', $targetId)->where('ipaddress', $this->request->ip())->where('counterName', $this->name)->first();
     } else {
         return $this->newModel()->where('targetId', $targetId)->where('userId', $user->getId())->where('counterName', $this->name)->first();
     }
 }
All Usage Examples Of Xpressengine\User\UserInterface::getId