fuel / oil

Fuel PHP Framework - Fuel v1.x Oil command-line package
http://fuelphp.com/docs/packages/oil/intro.html
106 stars 67 forks source link

Oil not setting up ORMAuth model #202

Closed mogusbi closed 11 years ago

mogusbi commented 11 years ago

When executing the oil refine migrate --packages=auth command, ORMAuth tables are set up in the database as expected, however, no model(s) is created therefore any time you try to access a page generated using the oil generate admin blah blah:string command, you're met with a log in screen but if you try to log in, you are met with an error saying that the "Class 'Model_User' [was] not found"

The error is coming from here: APPPATH/classes/controller/admin.php @ line 50

Line 50: $current_user = Model_User::find_by_username(Auth::get_screen_name());

WanWizard commented 11 years ago

This issue here is:

This means not only the Model call is incorrect, also the admin group check will fail, as permissions work differently in Ormauth, compared to Simpleauth.