diff --git a/src/main/java/fr/xephi/authme/datasource/MySQL.java b/src/main/java/fr/xephi/authme/datasource/MySQL.java index 9a1cf216..1b604153 100644 --- a/src/main/java/fr/xephi/authme/datasource/MySQL.java +++ b/src/main/java/fr/xephi/authme/datasource/MySQL.java @@ -282,6 +282,11 @@ public class MySQL extends AbstractSqlDataSource { + col.EMAIL + " VARCHAR(255);"); } + if (isColumnMissing(md, col.IS_VERIFIED)) { + st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + + col.IS_VERIFIED + " BIT;"); + } + if (isColumnMissing(md, col.IS_LOGGED)) { st.executeUpdate("ALTER TABLE " + tableName + " ADD COLUMN " + col.IS_LOGGED + " SMALLINT NOT NULL DEFAULT '0' AFTER " + col.EMAIL); diff --git a/src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java b/src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java index 6103183d..197b50a2 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/DatabaseSettings.java @@ -97,6 +97,10 @@ public final class DatabaseSettings implements SettingsHolder { public static final Property MYSQL_COL_EMAIL = newProperty("DataSource.mySQLColumnEmail", "email"); + @Comment("If the kickNotVerified setting is set to true and you want it to work in integration with your website, you must set the field name here to match the one on your database") + public static final Property MYSQL_IS_VERIFIED_FIELD = + newProperty("DataSource.mySQLVerifiedField", "isVerified"); + @Comment("Column for storing if a player is logged in or not") public static final Property MYSQL_COL_ISLOGGED = newProperty("DataSource.mySQLColumnLogged", "isLogged");