Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Can not create a user 'unknown column group_id'
  • HI,

    I try creating a user through oil console but I get an error message about unknown column group_id.
    Here is what I typed in oil console
    Auth::create_user('login', 'password', 'name@domain.com', 100)

    And the error message that I got
    Parse Error - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'group_id' in 'field list' with query: "INSERT INTO `users` (`username`, `password`, `email`, `group_id`, `profile_fields`, `last_login`, `login_hash`, `created_at`) VALUES ('login', 'GttPkyaV6pZAATxAb/psuX+QvpmdYNoB9lIRD/TP4JA=', 'name@domain.com', 100, 'a:0:{}', 0, '', 1371067599)"

    I am using SimpleAuth and for creating auth tables I used command line :
    oil refine migrate --packages=auth

    Do you have any idea of what am I doing wrong ?
    My version of FuelPHP is 1.6.1

    Laurent
  • HarroHarro
    Accepted Answer
    It's a bug.

    There's a typo at line 257 in auth/classes/auth/login.php, it should say 'group' there instead of 'group_id'.

    I've pushed a fix for this to 1.7/develop. You can just change this locally.
  • It worked.

    Thanks for your help.
  • hi

    same problem on branch 1.6/master
  • That is what this report is about.

    You have the option to:
    - apply the fix manually
    - switch to 1.7/develop
    - wait for 1.6.2 to be released
  • I'm getting a similar error - I'm happy to apply the fix manually, but can't seem to find the file you reference to edit. I'm looking inside packages/auth/classes/auth - is this the wrong place?
  • Sorted, sorry - tired Sunday eyes.

Howdy, Stranger!

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

In this Discussion