Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8208097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:13:38+00:00 2026-06-07T09:13:38+00:00

I have a web application where i have 5 level of users like Administrator

  • 0

I have a web application where i have 5 level of users like

  1. Administrator
  2. OrganisationHead
  3. LocalCOmpany head
  4. Teacher
  5. parents
  6. students

Now every userwill have different landing page or with some more or less tabs or features.

Now i want to know that is it i only make it as one Entity and then Roles in different entity so that i can simplify the login process

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T09:13:40+00:00Added an answer on June 7, 2026 at 9:13 am

    Here is an example of how you would go about it

    Your controller:

    public function indexAction()
    {
        $user = $this->container->get('security.context')->getToken()->getUser();
    
        return $this->render('YourBundle:Page:index.html.twig', array('user_role' => $user->getRole()));
    }
    

    Twig:

    {% if user_role == "administrator" %}
    Menu 1, menu 2, menu3
    {% elseif user_role == "organizationhead" %}
    Menu 1, Menu 4
    {% elseif user_role == "etc" %}
    Menu 5
    {% endif %}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have web application and I do not really care about IE6 users. However
I have a web application that allows users to enter search criteria and the
We have a web application that is generating some 3-5 parallel threads every five
DTO I'm building a Web application I would like to scale to many users.
I have web application written in java using Eclipse. It has just one servlet
I have web application which we deployed in a production . We have separate
I have web application Project having RPC call. one RPC async is working fine.
I have web application of which major part is javascript. I request images from
I have a web application that will be used on iPhones, and want to
I have a web application written in ASP.NEt/C# and javascript. It uses session variables.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.