Introduction of loop scopes.

This commit is contained in:
franck
2013-07-02 19:18:41 +02:00
parent 63e9707cc7
commit 18e49e7ebe
15 changed files with 326 additions and 30 deletions

View File

@@ -3,6 +3,8 @@
namespace Thelia\Model;
use Thelia\Model\om\BaseCustomer;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\Role\Role;
/**
@@ -16,6 +18,29 @@ use Thelia\Model\om\BaseCustomer;
*
* @package propel.generator.Thelia.Model
*/
class Customer extends BaseCustomer
class Customer extends BaseCustomer implements UserInterface
{
/**
* {@inheritDoc}
*/
public function getUsername() {
return $this->getEmail();
}
/**
* {@inheritDoc}
*/
public function eraseCredentials() {
$this->setPassword(null);
}
/**
* {@inheritDoc}
*/
public function getRoles() {
return array(new Role('USER_CUSTOMER'));
}
}