Finished authentication
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
@@ -26,4 +26,9 @@ class DefaultController extends Controller
|
||||
'article' => $article
|
||||
));
|
||||
}
|
||||
|
||||
public function forumMainAction()
|
||||
{
|
||||
return $this->forward('KekRozsakFrontBundle:Default:homepage');
|
||||
}
|
||||
}
|
||||
|
@@ -3,11 +3,12 @@
|
||||
namespace KekRozsak\FrontBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Security\Core\Role\RoleInterface;
|
||||
|
||||
/**
|
||||
* KekRozsak\FrontBundle\Entity\Role
|
||||
*/
|
||||
class Role
|
||||
class Role implements RoleInterface
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
@@ -136,4 +137,9 @@ class Role
|
||||
{
|
||||
return $this->included_roles;
|
||||
}
|
||||
}
|
||||
|
||||
public function getRole()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
|
@@ -3,11 +3,12 @@
|
||||
namespace KekRozsak\FrontBundle\Entity;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
/**
|
||||
* KekRozsak\FrontBundle\Entity\User
|
||||
*/
|
||||
class User
|
||||
class User implements UserInterface
|
||||
{
|
||||
/**
|
||||
* @var integer $id
|
||||
@@ -188,6 +189,15 @@ class User
|
||||
*/
|
||||
public function getRoles()
|
||||
{
|
||||
return $this->roles;
|
||||
return $this->roles->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
public function eraseCredentials()
|
||||
{
|
||||
}
|
||||
|
||||
public function getSalt()
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
}
|
||||
|
@@ -7,3 +7,8 @@ KekRozsakFrontBundle_article:
|
||||
pattern: /cikk/{articleSlug}
|
||||
defaults:
|
||||
_controller: KekRozsakFrontBundle:Default:article
|
||||
|
||||
KekRozsakFrontBundle_forum_main:
|
||||
pattern: /forum
|
||||
defaults:
|
||||
_controller: KekRozsakFrontBundle:Default:forumMain
|
||||
|
Reference in New Issue
Block a user