mirror of
https://github.com/wallabag/wallabag.git
synced 2025-10-15 19:42:08 +00:00
* public registration
* remove WSSE implementation * add oAuth2 implementation
This commit is contained in:
parent
8a60bc4cc2
commit
fcb1fba5c2
33 changed files with 551 additions and 528 deletions
|
@ -6,7 +6,6 @@ use Doctrine\Common\Collections\ArrayCollection;
|
|||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
|
||||
use JMS\Serializer\Annotation\ExclusionPolicy;
|
||||
use JMS\Serializer\Annotation\Expose;
|
||||
use FOS\UserBundle\Model\User as BaseUser;
|
||||
|
@ -22,7 +21,7 @@ use FOS\UserBundle\Model\User as BaseUser;
|
|||
* @UniqueEntity("email")
|
||||
* @UniqueEntity("username")
|
||||
*/
|
||||
class User extends BaseUser implements AdvancedUserInterface, \Serializable
|
||||
class User extends BaseUser
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
|
@ -75,6 +74,7 @@ class User extends BaseUser implements AdvancedUserInterface, \Serializable
|
|||
parent::__construct();
|
||||
$this->entries = new ArrayCollection();
|
||||
$this->tags = new ArrayCollection();
|
||||
$this->roles = array('ROLE_USER');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -90,24 +90,6 @@ class User extends BaseUser implements AdvancedUserInterface, \Serializable
|
|||
$this->updatedAt = new \DateTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set password.
|
||||
*
|
||||
* @param string $password
|
||||
*
|
||||
* @return User
|
||||
*/
|
||||
public function setPassword($password)
|
||||
{
|
||||
if (!$password && 0 === strlen($password)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->password = sha1($password.$this->getUsername().$this->getSalt());
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set name.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue