[eluser]Oskar Smith[/eluser]
Ah! Shortly after posting the above I think I've answered my own question. I think Redux expects the email_check and username_check to be used as a callback within the form validation routine. i.e.
Code:
$this->form_validation->set_rules('username', 'Username', 'required|callback_username_check');
$this->form_validation->set_rules('email', 'Email Address', 'required|callback_email_check|valid_email');
Then in your controller there needs to be two extra functions:
Code:
public function email_check($email)
{
$check = $this->redux_auth_model->email_check($email);
if ($check)
{
$this->form_validation->set_message('email_check', 'The email "'.$email.'" already exists.');
return false;
}
else
{
return true;
}
}
public function username_check($username)
{
$check = $this->redux_auth_model->username_check($username);
if ($check)
{
$this->form_validation->set_message('username_check', 'The username "'.$username.'" already exists.');
return false;
}
else
{
return true;
}
}
Knew it would be something simple. Having said that, I'd have half thought that Redux Auth would have a fail-safe check at the point at which the new user gets stored to the database to prevent duplicate emails/usernames. Anyway, as long as the above is there I guess I should be fine.