diff --git a/Source/Source.php b/Source/Source.php
index a047ee5..d2c37dd 100644
--- a/Source/Source.php
+++ b/Source/Source.php
@@ -42,6 +42,7 @@
'view_threshold' => VIEWER,
'update_threshold' => UPDATER,
'manage_threshold' => ADMINISTRATOR,
+ 'username_threshold' => DEVELOPER,
'enable_mapping' => OFF,
'enable_porting' => OFF,
diff --git a/Source/SourceIntegration.php b/Source/SourceIntegration.php
index 573671f..7724210 100644
--- a/Source/SourceIntegration.php
+++ b/Source/SourceIntegration.php
@@ -93,6 +93,10 @@
* @param int User ID
*/
function account_update_form( $p_event, $p_user_id ) {
+ if ( !access_has_global_level( config_get( 'plugin_Source_username_threshold' ) ) ) {
+ return;
+ }
+
$t_user = SourceUser::load( $p_user_id );
echo '
', plugin_lang_get( 'vcs_username', 'Source' ),
@@ -107,6 +111,10 @@
* @param int User ID
*/
function account_update( $p_event, $p_user_id ) {
+ if ( !access_has_global_level( config_get( 'plugin_Source_username_threshold' ) ) ) {
+ return;
+ }
+
$f_vcs_sent = gpc_get_bool( 'Source_vcs', false );
$f_vcs_username = gpc_get_string( 'Source_vcs_username', '' );
diff --git a/Source/lang/strings_english.txt b/Source/lang/strings_english.txt
index a9ee363..a432c4d 100644
--- a/Source/lang/strings_english.txt
+++ b/Source/lang/strings_english.txt
@@ -80,6 +80,7 @@
$s_plugin_Source_view_threshold = 'View Threshold';
$s_plugin_Source_update_threshold = 'Update Threshold';
$s_plugin_Source_manage_threshold = 'Manage Threshold';
+$s_plugin_Source_username_threshold = 'Set Username Threshold';
$s_plugin_Source_buglink_regex_1 = 'Bug Link Regex Pass 1';
$s_plugin_Source_buglink_regex_2 = 'Bug Link Regex Pass 2';
$s_plugin_Source_bugfix_regex_1 = 'Bug Fixed Regex Pass 1';
diff --git a/Source/pages/manage_config.php b/Source/pages/manage_config.php
index 327d378..b45f6cf 100644
--- a/Source/pages/manage_config.php
+++ b/Source/pages/manage_config.php
@@ -18,6 +18,7 @@
$f_view_threshold = gpc_get_int( 'view_threshold' );
$f_update_threshold = gpc_get_int( 'update_threshold' );
$f_manage_threshold = gpc_get_int( 'manage_threshold' );
+$f_username_threshold = gpc_get_int( 'username_threshold' );
$f_show_repo_link = gpc_get_bool( 'show_repo_link', OFF );
$f_show_search_link = gpc_get_bool( 'show_search_link', OFF );
@@ -71,6 +72,7 @@
maybe_set_option( 'view_threshold', $f_view_threshold );
maybe_set_option( 'update_threshold', $f_update_threshold );
maybe_set_option( 'manage_threshold', $f_manage_threshold );
+maybe_set_option( 'username_threshold', $f_username_threshold );
maybe_set_option( 'show_repo_link', $f_show_repo_link );
maybe_set_option( 'show_search_link', $f_show_search_link );
diff --git a/Source/pages/manage_config_page.php b/Source/pages/manage_config_page.php
index 9cc23a3..bab4425 100644
--- a/Source/pages/manage_config_page.php
+++ b/Source/pages/manage_config_page.php
@@ -52,6 +52,11 @@
|
>
+ |
+ |
+
+
+>
|
|