Open ChefMC opened 4 years ago
That's a wonderful question, also I would like if there's any chance to add more field's to the table user, and off-course control those fields?
You need to make your user tables compatible with the classes in src/Users I think, by replacing or extending them.
Adding other fields you can do, I extended EloquentUser, example:
class User extends \Cartalyst\Sentinel\Users\EloquentUser
{
protected $fillable = [
'email',
'password',
'last_name',
'first_name',
'permissions',
'company',
'department',
'title',
'phone',
'mobile',
'manager'
];
protected $loginNames = ['email'];
}
Then I added the configuration (which is the same file from src/config/config.php with changes) before starting the instance
$config = new Cartalyst\Sentinel\Native\ConfigRepository(__DIR__.'/src/customSentinelConfig.php');
$bootstrapper = new Cartalyst\Sentinel\Native\SentinelBootstrapper($config);
Sentinel::instance($bootstrapper);
I have my own users database from one game. Can I use this existing users database table and authorize players on web-site via Sentinel as framework (for auth, sessions/cookie mechanism, remember me feature, XSS/CSRF protection)?