table_alias = $this->query->ensure_table('signup_log', $this->relationship); $this->users_table = $this->query->ensure_table('users', 'signup_log'); } function query() { $this->ensure_my_table(); $this->aliases['signup_uid'] = $this->query->add_field($this->table_alias, 'uid'); $this->aliases['signup_anon_mail'] = $this->query->add_field($this->table_alias, 'anon_mail'); $this->aliases['users_mail'] = $this->query->add_field($this->users_alias, 'mail'); } function render($values) { if (empty($values->{$this->aliases['signup_uid']})) { return check_plain($values->{$this->aliases['signup_anon_mail']}); } else { return check_plain($values->{$this->aliases['users_mail']}); } } }