Zizaco / confide

Confide is a authentication solution for Laravel 4
1.19k stars 258 forks source link

No save or update... #109

Closed seemsindie closed 11 years ago

seemsindie commented 11 years ago

I have tried ways like $user = new User; ... $user->save();

And $user = User::create(array(...));

And amend() don't work either... Any suggestions why?

nightowl77 commented 11 years ago

There is an error object you can access. For a quick (but ugly) debug message

$user->amend();

$error = $user->errors()->all();

echo "<pre>";
var_dump($error);
oblogic7 commented 11 years ago

I am having the same exact issue. I am trying to save a token for the currently authenticated user... but $user->save does not work. If I var_dump($user->save()) it is returning false or if I dump getQueryLog() there are no update statements.

Something is definitely broken, I just don't know enough about Laravel to figure it out... yet.

byordereurope commented 11 years ago

I had the same problem when trying to set confirmed back to 0, the only way we succeeded was DB::table('users') and then do your stuff, so yeah, can be the same issue, and this is because propably ardent is not validating the data is some or other way. Also the reason why i wanted them to switch just to Eloquent instead of ardent or any other on-the-automatic-pilot validator tool. And when they finally wanted to drop ardent they just switching to another tool that propably will cause other problems than we face now. I wonder what the problem is of just using eloquent and do the validation manually.

andrew13 commented 11 years ago

The reason that it isn't done manually is just that. It's manual. Ardent should be removing a lot of the manual work from the user model.

byordereurope commented 11 years ago

Well in that case, we need an unconfirm method also and we need to make sure that a user CAN in fact be updated right ?

andrew13 commented 11 years ago

Both of those items are up to the developer to implement. I don't think those methods will make it in to the package.