コード例 #1
0
ファイル: UserService.php プロジェクト: jwoods/CE_27
 private function processGuid(User $user, $gString, $ipAddress, $fingerprint)
 {
     $guid = $this->userMapper->fetchGuidByGString($gString);
     if (!$guid) {
         $guid = $this->getGuidNew($gString);
         $guid->setIp($ipAddress);
         $guid->setFingerprint($fingerprint);
         $this->userMapper->save($guid);
     }
     $ug = $this->userMapper->fetchUserGuidByUserIdAndGString($user->getId(), $gString);
     if ($ug) {
         $ug->setDateLogin(new \DateTime());
         $ug->setIpLogin($ipAddress);
         $ug->setFingerprintLogin($fingerprint);
     } else {
         $ug = $this->getUserGuidNew($user, $guid);
     }
     $this->userMapper->save($ug);
 }
コード例 #2
0
ファイル: PressService.php プロジェクト: jwoods/CE_27
 public function getDraftsArrayByAuthor(User $u)
 {
     return $this->pressMapper->fetchDraftsArrayByUserId($u->getId());
 }