/** * @param \ride\web\security\model\orm\entry\UserEntry $user * @return null */ public function setUser(AliasUserEntry $user = NULL) { $isClean = false; if (!$this->user && !$user || $this->user && $user && $this->user->getId() === $user->getId()) { $isClean = true; } $this->user = $user; if (!$isClean && $this->entryState === self::STATE_CLEAN) { $this->entryState = self::STATE_DIRTY; } }
/** * @param \ride\web\security\model\orm\entry\UserEntry $user * @return null */ public function setUser(UserEntry $user = NULL) { if (!isset($this->loadedFields['user'])) { $this->loadProperties(); } $oldValue = null; if (array_key_exists('user', $this->loadedValues)) { $oldValue = $this->loadedValues['user']; } if (!$oldValue && !$user || $oldValue && $user && $oldValue->getId() === $user->getId()) { $this->user = $user; return; } return parent::setUser($user); }