using sfDoctrineGuardPlugin for regular member login?

Posted by fayer on Stack Overflow See other posts from Stack Overflow or by fayer
Published on 2010-05-18T17:42:43Z Indexed on 2010/05/18 18:00 UTC
Read the original article Hit count: 410

Filed under:
|

i want to create users for my webapplication.

im using symfony. i wonder if i should do that with sfDoctrineGuardPlugin or symfony's provided methods for this?

// Add one or more credentials
$user->addCredential('foo');
$user->addCredentials('foo', 'bar');

// Check if the user has a credential
echo $user->hasCredential('foo');                      =>   true

// Check if the user has both credentials
echo $user->hasCredential(array('foo', 'bar'));        =>   true

// Check if the user has one of the credentials
echo $user->hasCredential(array('foo', 'bar'), false); =>   true

// Remove a credential
$user->removeCredential('foo');
echo $user->hasCredential('foo');                      =>   false

// Remove all credentials (useful in the logout process)
$user->clearCredentials();
echo $user->hasCredential('bar');                      =>   false

or is the purpose of sfDoctrineGuardPlugin just securing the admin page and not the frontend logging system?

thanks.

© Stack Overflow or respective owner

Related posts about symfony

Related posts about authentication