EE requires screen_names to be unique. Previously, in conjunction with Profile:Edit, I have appended {current_time} on to the end of a user's screen_name during registration to workaround this (it's not used anywhere on the front end so is useless to me). However, the screen_name variable is used in the default forgotten password email, and there are no other suitable variables available in that email template. So I'm finally resorting to a hack.
Around line 227 of system/libraries/Validate.php there is this
/** -------------------------------------
/** Is screen name taken?
/** -------------------------------------*/
if (strtolower($this->cur_screen_name) != strtolower($this->screen_name))
{
$query = $this->EE->db->query("SELECT COUNT(*) AS count FROM exp_members WHERE screen_name = '".$this->EE->db->escape_str($this->screen_name)."'");
if ($query->row('count') > 0)
{
$this->errors[] = $this->EE->lang->line('screen_name_taken');
}
}
Can anyone foresee any problems with simple commenting out this whole block? Is there even a reason I haven't thought of as to why screen_names should be unique?