public function updateEmail($email) { if ($email && ($email == $this->email || !$this->isEmailExists($email))) { $this->email = $email; } else { throw new Exception('Uh oh. Seems like that email is already in use. Try another?'); } }