Would be nice to have support for activation/deactivation of user accounts, as well as throttling of accounts (ability to suspend or ban users).
I think account activation and deactivation should be under Orchestra/Model. As far as I know there's a plan to support user throttling but that will be under Orchestra/Throttle
Throttling is under consideration in https://github.com/orchestral/throttle (no code yet). For activation and deactivation I'm open for suggestion on how we should do it on orchestra/auth level.
Additionally I'm also working on https://github.com/orchestral/warden (detail in orchestral/warden#1).
For me on orchestra/auth would be nice to have something like
Auth::attempt($credentials);
if (Auth::isUnverified())
{
....
}
So that we can verify user status on login. As for changing the status that can be included in the user model.
Orchestra\Model\User already has few constant that we can utilize (see https://github.com/orchestral/model/blob/master/src/Orchestra/Model/User.php#L15), however Eloquent driver is only enforced when you're using it with Orchestra Platform, as a component, we still need to append/handle it via Illuminate\Auth\GenericUser as well.
The end result should be something as:
if (Auth::attempt($credentials))
{
// Unverified user should still be able to logged in.
// However we could notify the user that the user has yet to be verified.
if ( ! Auth::user()->isVerified()) {
Orchestra\Message::extend(function ($m) {
$m->add('error', 'Your account is yet to be verified!');
});
}
}