We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32241
    • 1,495 Posts
    Hi, I found MODx is really great in terms of extendability of creating a new snippets/plugins. But one thing that is really missing from MODx is the extendability of the user system. I would like to see a lot easier API that we can use to register user and etc, instead of accessing it directly from database. I also want to see the ability to allow web user to edit their own user on the same group, just like forum. I know the user system will be revamped to the new architecture.

    SO I was hoping with this post, we can get a better idea of what other people might think about the future features that MODx really need in term about user system.

    I want to see that the required field for each user will be expandable, and allowing us to make a different required field based on each group. If we have a clear user base system, I believe reinventing our own forum will be a lot easier. Honestly, I think the way Drupal integrate their own simple forum is a good way to go. Not so many people in here requried a full-blown forum like what we use right now, but most of the time we need a simple and straight forward forum system or maybe calendar or other system that are simple and totally integrated on the MODx API. With the improvement in the user architecture, I believe this whole addition will be achievable in the future by the secon tier users such as myself.

    Sincerely,
      Wendy Novianto
      [font=Verdana]PT DJAMOER Technology Media
      [font=Verdana]Xituz Media
      • 32241
      • 1,495 Posts
      Ok, to solve my dilemma, I come up with a better idea. Will there be any API going to be added on the future release? I would like to hack the current core to use that function calling, so later with the upgraded version, I’ll be able to upgrade my current custom snippet or anything easily.

      So far I found 2 API,
      getUserInfo($uid) -> I believe this is for fetching manager user

      Will there be any API to create new, delete, update, view, or list users in the future?

      Thanks
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
      • There will be a new user API; but it is not yet available. In the meantime, I suggest writing a separate class to include in your code that you can implement this in now, then when the new API is available, your class can serve as a wrapper to allow your interim API to interact with the new API.

        Most likely, a user object will be available and the methods of the user object would be used to manage the data, e.g.
        ...
        if (is_object($modx->user) && $modx->user->isAuthenticated()) {
          $modx->setPlaceholder('username', $modx->user->getUsername());
        }
        ...
        

        or
        ...
        $user= new cmsUser();
        $user->setUsername($name);
        $user->setPassword($pwd);
        if ($user->save()) { ... }
        ...
        

        but again, none of this has been set in stone as of yet, and the end API may differ from what I’m describing here.

        I’ll talk more about the new user architecture after some more decisions are made.
          • 32241
          • 1,495 Posts
          Quote from: OpenGeek at Jan 26, 2006, 04:03 AM

          There will be a new user API; but it is not yet available. In the meantime, I suggest writing a separate class to include in your code that you can implement this in now, then when the new API is available, your class can serve as a wrapper to allow your interim API to interact with the new API.

          That really is a great idea. Why I never thought of that. undecided
          I’ll see what I can do for now. I need to setup a front admin for web user to be integrated on newsletter snippet, so that the admin user (web/manager) that has right to administer the newsletter able to delete somebody from the web user group or completely remove the user from database.

          The functionality will be totally the same as bringing the whole user admin on the backend site to the front end, with limited web group to be displayed, instead of all of them.

          Do you think this will take quite a lot of time? I might think to make this as a separate snippet with the ability to list users from defined web group by snippet calling, and allow edit, delete, and add user; as well as add and delete web group assigned to the user.

          Thanks Jason
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media