password) && !$user->notRegistered) ? $user : new NullDataStore(); } public static function getProps() { return [ 'email', 'password', 'name', 'signupDate', 'tickets', 'sharedTicketList', 'verificationToken', 'disabled', 'xownCustomfieldvalueList', 'notRegistered' ]; } public function getDefaultProps() { return []; } public static function getUser($value, $property = 'id') { return parent::getDataStore($value, $property); } public function canManageTicket(Ticket $ticket){ $ticketNumberInstanceValidation = true; if($this->ticketNumber) { $ticketNumberInstanceValidation = $this->ticketNumber == $ticket->ticketNumber; } return ($ticket->isAuthor($this) && $ticketNumberInstanceValidation); } public function toArray() { return [ 'email' => $this->email, 'id' => $this->id, 'name' => $this->name, 'verified' => !$this->verificationToken, 'disabled' => $this->disabled, 'customfields' => $this->xownCustomfieldvalueList->toArray(), 'notRegistered' => $this->notRegistered ]; } }