User Registration in CodeIgniter — a practical guide to CodeIgniter registration with clear examples you can reuse in real projects.
CodeIgniter Tutorial Series (52/74). Prefer one article? Read the complete CodeIgniter tutorial.
Short description
Validate unique email, hash passwords, then insert the user and redirect to login.
Register user
$model = model('UserModel');
$model->insert([
'name' => $this->request->getPost('name'),
'email' => $this->request->getPost('email'),
'password' => password_hash($this->request->getPost('password'), PASSWORD_DEFAULT),
]);