0

I am working on a project with Tank Auth and I would like to use the email addresses of my users as their username to login on the application.

This is the first time I work with a extensive library like this and I'm puzzled.

On the register view I have commented out the input for an email address and in the library of Tank Auth (line 177) I set email to the username as well.

Now when I try to register, I get an error that I can't include underscores or @-signs in the username. Where can I find these restrictions? Because I want to put email addresses here and store them as usernames.

Any advice is more than welcome. If you need more info, just ask :)

Glenn
  • 635
  • 2
  • 11
  • 23

1 Answers1

3

I think to can accomplish this with Tank Auth without a big mess.

Tank Auth provides options to activate login by email,username or both.

Simply go to application/config/tank_auth.php and edit the following lines

$config['login_by_username'] = FALSE;
$config['login_by_email'] = TRUE;

Then if you want you can totally remove the username field from 'users' table, register form etc.

St0iK
  • 628
  • 3
  • 10