Fix user not filling email, password and remember_token

This commit is contained in:
James Brooks 2014-12-04 23:05:17 +00:00
parent 99ee0247ed
commit 5c9ca420c1
2 changed files with 9 additions and 1 deletions

View File

@ -35,6 +35,7 @@ class SetupController extends Controller {
// Pull the user details out.
$userDetails = array_pull($postData, 'user');
// TODO: Do we want to just use Eloquent::unguard() here?
$user = User::create([
'username' => $userDetails['username'],
'email' => $userDetails['email'],

View File

@ -25,7 +25,14 @@ class User extends Eloquent implements UserInterface, RemindableInterface {
* Items which can be mass assigned.
* @var array
*/
protected $fillable = ['username'];
protected $fillable = [
'username',
'password',
'email',
'remember_token',
'active',
'level',
];
/**
* Hash any password being inserted by default