Thread

ExpressionEngine hook or API for user creation?

January 09, 2018 1:19am

Subscribe [1]
  • #1 / Jan 09, 2018 1:19am

    Nibb

    142 posts

    EE never had an API, and I find some things incredibly hard if not impossible to do. One of my main requests is to be able to create users on the fly programmatically. This could be with a cron, or by executing a specific EE (password or code protected) EE template URL where I can pass the relevant username, group, etc.

    Creating a simple CURL post form is not as easy as it sounds because I also allow public registration and so the form XSS protection is enabled + captcha. There is no easy way around this as the security features are designed exactly to prevent automated account creation. It would be a total mess to do this with a POST request externally instead of just tapping inside EE directly with lower privileges or directly into the database.

    Looking at the database, there is no documentation what so ever about the type of salt and hash EE 3 is using for the members’ table either. Otherwise, I would just write a PHP SQL query and add the users directly. There is zero information at all about how to create a user automatically with ExpressionEngine :(

    In the past with EE2 I used a module called auto register and it worked just fine. The module is not compatible with EE3 anymore (like 90% of the modules which are EE2 only). I contacted the author and never heard back as I paid him in the past to have it slightly modified.

    Why is this so hard to do with EE? I never had problems creating users on other CMS systems, they all have some API or hook code you can use to create users. I posted the question on Stack Exchange some weeks back, and nobody replied either. I find it hard to believe that every company or site in the world using EE is creating users manually from the admin side. I have searched for days now, and I cannot find a simple solution to create members in the database.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases