• Resolved bitstash

    (@bitstash)


    I have tested this plugin on our site, it does not allow a user to log back in. It returns with the message “Error: username already exists”

    Additionally how can we include this within the WooCommerce account register and login section with the [my-account] shortcode?

Viewing 8 replies - 16 through 23 (of 23 total)
  • Thread Starter bitstash

    (@bitstash)

    I will try this in the next few days. The code provided can this be ran directly into mysql?

    wp-admin/includes/upgrade.php provides a 500 error.

    • This reply was modified 5 years, 8 months ago by bitstash.
    Plugin Author lynn999

    (@lynn999)

    The code provided can this be ran directly into mysql?

    Almost.

    CREATE TABLE {$wpdb->base_prefix}ethpress_addresses (
      id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
      name varchar(255) NOT NULL,
      user_id BIGINT UNSIGNED NOT NULL,
      coin varchar(15) DEFAULT NULL,
      date datetime DEFAULT '2000-01-01 00:00:00',
      modified datetime DEFAULT '2000-01-01 00:00:00',
      PRIMARY KEY  (id),
      UNIQUE KEY name (name),
      KEY user_id (user_id)
    );

    You need to swap out “{$wpdb->base_prefix}” to match whatever prefix you see in your “users” table. For example, it could be “wp5454_users”, or “wp12321321_users”, or something different, and then you would use

    CREATE TABLE wp5454_ethpress_addxresses (
      id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
      name varchar(255) NOT NULL,
      user_id BIGINT UNSIGNED NOT NULL,
      coin varchar(15) DEFAULT NULL,
      date datetime DEFAULT '2000-01-01 00:00:00',
      modified datetime DEFAULT '2000-01-01 00:00:00',
      PRIMARY KEY  (id),
      UNIQUE KEY name (name),
      KEY user_id (user_id)
    );

    or wp12321321_ethpress_addresses. It can be ran directly.

    You can run: SHOW TABLES LIKE %ethpress_addresses to see if the table does exist.

    Error 500 is correct, so no problem there.

    Thread Starter bitstash

    (@bitstash)

    When trying to add the database reference I get the following error: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

    Thread Starter bitstash

    (@bitstash)

    Using MarinaDB could this be the issue?

    Plugin Author lynn999

    (@lynn999)

    Good error to find. Could you give this a try, then:

    CREATE TABLE {$wpdb->base_prefix}ethpress_addresses (
      id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
      name varchar(191) NOT NULL,
      user_id BIGINT UNSIGNED NOT NULL,
      coin varchar(15) DEFAULT NULL,
      date datetime DEFAULT '2000-01-01 00:00:00',
      modified datetime DEFAULT '2000-01-01 00:00:00',
      PRIMARY KEY  (id),
      UNIQUE KEY name (name),
      KEY user_id (user_id)
    );

    (again replacing “{$wpdb->base_prefix}”)
    Here name varchar(255) is changed to name varchar(191). If that throw the same error, then keep lowering it. Anything above 60 will work fine for a long time. I searched the error message and that line seems to be the issue in your case.

    Thinking of the future, however, you might want to consider touching on the settings of your database. Even woocommerce uses varchar(255) in table creation, so you might run into the same error elsewhere. But apparently newer databases like to use a limit of 191, so I will change into that one as well. Or maybe the issue is within this plugin? It is hard to say.

    edit: I also pushed a development new version that has this change to 191.

    • This reply was modified 5 years, 8 months ago by lynn999.
    • This reply was modified 5 years, 8 months ago by lynn999.
    • This reply was modified 5 years, 8 months ago by lynn999.
    Thread Starter bitstash

    (@bitstash)

    The recent development release has worked!!! v.0.2.3

    However there are some minor issues.

    When a user logins/registers to site 1 it limits the users access to only this site.
    When the same eth address/user tries to login/register on site 2 (or another site in the network) it does not associate that site. Login is successful however it redirect them back to site 1 being logged in.

    I really appreciate your help and assistance in getting this to work!

    Plugin Author lynn999

    (@lynn999)

    Wow, unexpected, but fantastic!

    When a user logins/registers to site 1 it limits the users access to only this site.
    When the same eth address/user tries to login/register on site 2 (or another site in the network) it does not associate that site. Login is successful however it redirect them back to site 1 being logged in.

    You know, I don’t think WordPress does this in its default register flow, but it is confusing how that works, so I did make it work the way you would expect. Try the newer version, 0.2.4.

    Traditionally, you log into one site, and then you’re basically logged into all the sites. At least for me, I can log into site1, then browse to site2, and I’ll stay logged in.
    It still works like that, but now if you log out and then log back in on another site, it’ll associate you with that site as well.

    I would’ve thought there were plugins that would do all that, but I couldn’t find anything.

    • This reply was modified 5 years, 7 months ago by lynn999.
    Thread Starter bitstash

    (@bitstash)

    Yes the v0.2.4 the latest development version works just as expected on multisite. No issues what so ever at this time.

    I greatly appreciate your assistance in getting this to work properly.

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Does not allow users to log back into their account’ is closed to new replies.