Commit 9b96813b authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

FIX : lastRole

parent 8c4be42f
Loading
Loading
Loading
Loading
Loading
+2 −27
Original line number Diff line number Diff line
@@ -86,13 +86,13 @@ class Authentification implements UserInterface, ProviderInterface
    protected $secret;


    protected $lastRole;

    /**
     * @return AbstractRole|null
     */
    public function getLastRole()
    {
        return $this->lastRole;
        return null;
    }

    /**
@@ -101,8 +101,6 @@ class Authentification implements UserInterface, ProviderInterface
     */
    public function setLastRole(AbstractRole $lastRole = null)
    {
        $this->lastRole = $lastRole;

        return $this;
    }

@@ -115,29 +113,6 @@ class Authentification implements UserInterface, ProviderInterface
        $this->settings = [];
    }


    protected $lastRole;

    /**
     * @return AbstractRole|null
     */
    public function getLastRole()
    {
        return $this->lastRole;
    }

    /**
     * @param AbstractRole|null $lastRole
     * @return self
     */
    public function setLastRole($lastRole = null)
    {
        $this->lastRole = $lastRole;

        return $this;
    }


    public function hasRole( $roleId ){
        foreach ($this->getRoles() as $role ){
            if( $roleId == $role ){