Welcome Guest, Not a member yet? Register   Sign In
Signup/register in Ion Auth

Still struggling with the integration op Ion Auth in CodeIgniter.

Just as many applications, we have not only a signin function but also a signup, where users can register to the site.
The only function in the Auth controller class which seems a candidate for this is the create_user() function. But it only redirects back to the login page, which is not strange when we look at the code below:

function create_user()
  $this->data['title'] = "Create User";
  if (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())
redirect('auth', 'refresh');

Of course a new user of the site who wants to signup is not logged in so the first part of the test evaluate to TRUE and the user is redirected. Whihh makes it impossible to sign up!

In fact I do not really understand the test in the if clause. The Boolean condition
if (!loggedin || !isadmin)

means that only a logged-in adminstrator can register a new user, which is not the desired behaviour in an Web application where users can registrate themselves.

Is this a known issue? I find it very hard to find good information about this problem.

Theme © iAndrew 2016 - Forum software by © MyBB