- XDB::execute('REPLACE INTO emails (uid,email,flags) VALUES({?},{?},"active")', $this->user->id(), $email);
+ // If the email was already present for this user, we reset it to the default values, we thus use REPLACE INTO.
+ XDB::execute('REPLACE INTO emails (uid, email, flags)
+ VALUES ({?}, {?}, \'active\')',
+ $this->user->id(), $email);