• hayaalahmad

    (@hayaalahmad)


    Hello, I am building a school’s portal, and I want to know if WordPress is the right choice for me and if it will give me what I need.
    In this portal I have many users (students, teachers, admins, parents) each of them have their own features and capabilities. For example, some pages and functionalities may be available to students and not parents. I wish to know if WordPress has this capability. and how?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator bcworkz

    (@bcworkz)

    There are a number of “membership” plugins you can use to manage which users can see what. We don’t know enough about you to say if WordPress is the best choice. I can confidently say it’s capable of meeting your needs in some fashion. You’ll likely need a few plugins to get there, which is not unusual at all. In some cases, some aspect may need to be custom coded. If you get into that realm, nearly anything is possible.

    mrtom414

    (@mrtom414)

    the member’s plugin will allow you to set and create new roles for users. You can find it in the plugin repository at https://www.ads-software.com/plugins/members/

    Thread Starter hayaalahmad

    (@hayaalahmad)

    @bcworkz @mrtom414 Thank you very much. I installed the membership plugin that @mrtom414 suggested. It works fine in hiding the pages according to User’s role. However, what I want is to hide “Menu items” from certain users. I tried 2 plugins for this (If menu) and (User Menus) They both work fine on top-level menu items But they don’t work on sub-menu items. Could you please help me with that?

    Moderator bcworkz

    (@bcworkz)

    That aspect may need to be custom coded. You could simply hide specific menu items with CSS under certain conditions. It doesn’t offer any real security, knowledgeable users could easily find the links if they were so inclined, but it could deter most users. Security ought to be enforced at the destination page anyway. You could hook the “wp_print_styles” action, check if conditions are right, and if so, output the appropriate CSS.

    The specific items could be completely removed from the menu after checking for appropriate conditions through the ‘wp_nav_menu_objects’ filter.

    Thread Starter hayaalahmad

    (@hayaalahmad)

    @bcworkz Thank you it worked now. I have another question. Please bare with me as I am still a beginner.
    In the portal I am developing (on WordPress), I have links to external web systems (ixl/managebac/turnitin), and I want to accomplish the following scenario:
    1- The student logs in to my portal (Done).
    2- After logging in, when the student clicks on ixl.com link (for example), I want him to be automatically logged in to ixl. Please note that I have ixl login credentials stored in my database. I think this is possible using Jquery ? I am thinking of getting the login credentials from the database and send it to ixl.com somehow. Please note that security is not an issue. SO how can I do this in the simplest way possible? Thanks alot

    Moderator bcworkz

    (@bcworkz)

    It depends upon the ixl site and how it manages logins. For example, if it has an API for that, you could use jQuery to make Ajax requests to effect the log in. It’s even feasible in some cases to construct a HTTPS POST request that mimics that from their login form and successfully effect a log in. However, proper security on their end would likely prevent that.

    Your jQuery could possibly get their login form, “fill it out” (so to speak) and submit it. It’s an inherently weak approach, as login forms can change without notice. If the ixl site supports some sort of single sign on scheme like through Google or Facebook, there are similar plugins for WP. The user would still need to authorize each login, but it’s a lot easier than laboriously filling out login forms every time.

    Thread Starter hayaalahmad

    (@hayaalahmad)

    “Your jQuery could possibly get their login form, “fill it out” (so to speak) and submit it.

    How could I get their login form? could you please provide me with a code example?
    and also could you please tell me where to put this code in WordPress?.

    Moderator bcworkz

    (@bcworkz)

    All jQuery code should be enqueued with wp_enqueue_script(). The jQuery itself would be in external files, enqueuing places a link reference to the file on the page. The code to enqueue can go in a theme’s functions.php or a custom plugin. (custom plugins are pretty easy to create)

    The code requests the login form and stores the returned content in a variable. Using string manipulation functions, the necessary data is extracted which would be needed to submit a login request, such as field names and security nonce values. POSTing all the necessary data should result in a successful login.

    Sorry, I don’t have example code I could provide. FWIW, the technique is essentially what some black hat apps do to guess passwords and gain unauthorized, privileged access to sites. The difference being your app would be authorized and would have the correct credentials.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Multiple front-end users’ is closed to new replies.