ole1986 / wp-ispconfig3

Wordpress ISPConfig plugin with Gutenberg support
https://wordpress.org/plugins/wp-ispconfig3/
28 stars 13 forks source link

Failed to create wp user #33

Closed milenmk closed 3 years ago

milenmk commented 3 years ago

On creating an account I get this error: "Failed to create wp user"

ole1986 commented 3 years ago

The SOAP settings are given correctly? Is the user being created in ISPConfig?

ole1986 commented 3 years ago

As I wanted to update the compatibility flag anyway I am going to improve the error output of such. So you might know the exact reason why the user could not be created.

milenmk commented 3 years ago

Yes, the settings are ok. I am setting a particular client limits template, so if no template is set I get an error for it. I've played a lot yesterday, but cannot remember the exact settings I've used. However, I remember, that I wrote a custom client name. I presume it is an issue with "wp-name" or "wp-user". I can give you access to play around and test if you need.

P.S.: I've made the changes, but the result is still the same: just "Failed to create wp-user"

ole1986 commented 3 years ago

Version 1.5.3 should at least come up with a detailed error msg

milenmk commented 3 years ago

As a reference, this is what I've managed to find in logs:

in PHP log: PHP message: PHP Warning: in_array() expects parameter 2 to be array, string given in /path-to-folder/wp-content/plugins/wp-ispconfig3/index.php on line 320 \n', referer: https://blacktiehost.com/wp-admin/admin.php?page=ispconfig_settings

and in apache vhost access log:

web.mydomain.com:443 192.168.xxx.xxx - - [17/Mar/2021:13:16:04 +0200] "POST /remote/index.php HTTP/1.1" 200 5267 "-" "PHP-SOAP/7.2.34-18+ubuntu20.04.1+deb.sury.org+1" web.mydomain.com:8080 127.0.0.1 - - [17/Mar/2021:13:16:04 +0200] "POST /remote/index.php HTTP/1.1" 200 3970 "-" "PHP-SOAP/7.2.34-18+ubuntu20.04.1+deb.sury.org+1" web.mydomain.com:8080 127.0.0.1 - - [17/Mar/2021:13:16:04 +0200] "POST /remote/index.php HTTP/1.1" 500 890 "-" "PHP-SOAP/7.2.34-18+ubuntu20.04.1+deb.sury.org+1" web.mydomain.com:443 192.168.xxx.xxx - - [17/Mar/2021:13:16:04 +0200] "POST /remote/index.php HTTP/1.1" 500 890 "-" "PHP-SOAP/7.2.34-18+ubuntu20.04.1+deb.sury.org+1"

web.mydomain.com is the domain you can use to access the control panel instead of using an IP address.

And no, no detailed message. Just the same as before.

ole1986 commented 3 years ago

When you have the version 1.5.3 installed it should at least output the alert with a ":" So its supposed to be:

Failed to create wp-user: [....]

Can you confirm?

milenmk commented 3 years ago

Yes. Working now. The problem is when I set the e-mail address to wp-mail. The error is:

Failed to create wp user: Sorry, that email address is already used!

Also, a new user is created in Wordpress too, matching the client in ISPConfig.

ole1986 commented 3 years ago

Try using a different email address. That should solve the issue. Since you are not allow to add two accounts with the same email in wordpress

milenmk commented 3 years ago

Point is, that users almost all the time have one e-mail address. When they are registered in WordPress as a user, and they want to create an account in ISP, they will use the same e-mail address. Also, why create a new account in WordPress, when they already have one?

milenmk commented 3 years ago

What should I change to have only ISPConfig account created?

ole1986 commented 3 years ago

I can provide an option with the next update. So you can enable/disable the wp user creation

milenmk commented 3 years ago

I can provide an option with the next update. So you can enable/disable the wp user creation

That will be excellent. Thanks.

ole1986 commented 3 years ago

Please keep it open for reference. Thanks

ole1986 commented 3 years ago

With the upcoming version (1.5.4 I assume) you will be able to unhook the following setting:

image