You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to provide different login/register pages/forms for my users, but the users are the same class. I don't want to populate the database with additional tables.
class RegistrationController extends Controller
{
/**
* @Route("/asd1", name="login1")
*/
public function registerUserAction()
{
return $this->container
->get('pugx_multi_user.registration_manager')
->register('AppBundle\Entity\SfGuardUser');
}
/**
* @Route("/asd2", name="login2")
*/
public function registerAdminAction()
{
return $this->container
->get('pugx_multi_user.registration_manager')
->register('AppBundle\Entity\SfGuardUser');
}
}
This configuration doesn't work unfortunately, mainly because UserDiscriminator takes values by class instead of user type names. For instance, to get the template, the discriminator does this
I want to provide different login/register pages/forms for my users, but the users are the same class. I don't want to populate the database with additional tables.
This configuration doesn't work unfortunately, mainly because UserDiscriminator takes values by class instead of user type names. For instance, to get the template, the discriminator does this
Which will return it by
AppBundle\Entity\SfGuardUser
instead ofnormal or admins
Is there a way to have a single class for multiple types of users?
The text was updated successfully, but these errors were encountered: