0 Replies Latest reply on Jul 3, 2014 5:58 AM by thetwobrothersinc

    HELP Login with 2 types of users: Admin and User - FB4.6

    thetwobrothersinc

      Hello forum

       

      i need some help from experts here.

      im creating a small project where i want to have 3 kind of users to login and based on there role go to their page.

      I have a Admin role, Sales Rep role and Retailer role.

       

      I have a Main.mxml that has a viewstack on it loading each module.

      I have 4 Modules: Login.mxml, Admin.mxml, Sales.mxml and Retailer.mxml.

       

      <?xml version="1.0" encoding="utf-8"?>

      <data>

          <user>

              <userID>01</userID>

              <userName>admin</userName>

              <email>xxx</email>

              <password>123456</password>

              <role>Admin</role>

          </user>

          <user>

              <userID>02</userID>

              <userName>user</userName>

              <email>xxx</email>

              <password>123456</password>

              <role>Sales</role>

          </user>

          <user>

              <userID>03</userID>

              <userName>retailer</userName>

              <email>xxx</email>

              <password>123456</password>

              <role>Retailer</role>

          </user>

      </data>

       

      I want to be able to when one of this 3 login it send them to their module.

       

      What is the best way to do this

      Any help please