Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ion Auth - Restrict emails when registering
class users_m()
function restrict_email()
$emails = array('', '');
function register_user()
//set the hook
$this->ion_auth->set_hook('pre_register', 'restrict_emails', $this->users_m, 'restrict_email');
//other stuff...
$user = array(
'email' => $this->input->post('email'),
'password' => $this->input->post('password'),
//before the user is created the hook will be called automatically
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment