Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Creating user with no email
  • I'm using Simpleauth for register/login functionality. So, my users table has an username, email, password, etc...
    I am using the create_user() function in order to create new users.. This function requires "email" as one of its parameters.. How would I go about to create a new user without the email address? 
    Ideally, I would like to create a new user, based on an user model... then, update its properties from an array (form data), and then create an user given that model.... is that possible?


    Thank you.
  • HarroHarro
    Accepted Answer
    Yes, that is not a problem. It only means that you have to manually hash the password before you store it, something that create_user() will do for you.

    You hash the password using Auth::hash_password(), this ensures you can use Simpleauth to login.

    The create_user() method requires the email address, because the Simpleauth driver allows a login via both username and email address, and therefore needs both to ensure both are unique.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion