@@ -238,30 +238,6 @@ function drupalorg_git_gateway_get_total_accounts() {
returndb_query('SELECT count(distinct(uid)) FROM {users_roles} WHERE rid IN (:rid, :rid2)',array(':rid'=>DRUPALORG_GIT_GATEWAY_RID,':rid2'=>DRUPALORG_GIT_GATEWAY_VETTED_RID))->fetchField();
}
/**
* Create a suggested username based on the provided name value, ensuring
drupal_set_message(t('You will not be able to use Git until you have selected a Git username. A suggestion has been provided for you, based on your username. <strong>Note that once chosen, your Git username cannot be changed.</strong>'),'warning');
drupal_set_message(t('You will not be able to use Git until you have selected a Git username.'),'warning');
}
}
else{
$form['access']=[
'#weight'=>-20,
'username'=>[
'#type'=>'item',
'#title'=>t('Your Git username'),
'#markup'=>$account->git_username,
'#description'=>t('You can use this as your HTTPS username when authenticating with Git to Drupal.org. Using SSH is recommended and the username is always <code>git</code>. Drupal.org uses this username to generate your personalized sandbox URIs. <a href="!gitauth">More about Drupal.org Git authentication</a>',['!gitauth'=>url('gitauth')]),
],
];
// If GitLab is present, add HTTPS password management.
@@ -119,7 +99,6 @@ function drupalorg_git_gateway_user_form($form, &$form_state) {
catch(Exception$e){
watchdog('drupalorg_git_gateway','Exception in GitLab token UI for user %user error: %msg',['%user'=>$account->uid.' - '.$account->git_username,'%msg'=>$e->getMessage()],WATCHDOG_WARNING);
'#description'=>t('You can use this as your HTTPS username when authenticating with Git to Drupal.org. Using SSH is recommended and the username is always <code>git</code>. Drupal.org uses this username to generate your personalized sandbox URIs. <a href="!gitauth">More about Drupal.org Git authentication</a>',['!gitauth'=>url('gitauth')]),
],
'#weight'=>-1,
];
$form['username_container']=[
'#type'=>'fieldset',
'#title'=>t('Git username'),
'#collapsible'=>FALSE,
'#collapsed'=>FALSE,
'#weight'=>-20,
);
$form['#description']=t('Choose a username to use for Git. This can be used when authenticating to Drupal.org with Git, and Drupal.org will use it to generate your personalized sandbox URIs. <strong>Once chosen, your Git username cannot be changed.</strong>');
'#description'=>t('Can contain A-Z letters, numbers, periods, underscores, and dashes. Can not start with a dash; or end with a dash, dot, <code>.git</code>, or <code>.atom</code>.'),
);
];
return$form;
}
@@ -282,7 +265,10 @@ function _drupalorg_git_gateway_user_config($account) {
'#weight'=>15,
);
$user_config=t('You will not be credited in commit statistics or listings unless you set the Git email address to either <a href="!emailadmin">an address associated with your account</a> or the anonymized email provided below. Read <a href="!handbook">the handbook</a> for a full discussion of identifying yourself to Git. We recommend:',(array('!handbook'=>url('node/1022156'),'!emailadmin'=>url("user/$account->uid/edit/email-addresses"))))."\n";
$user_config=t('Your commits may not be credited in commit statistics or listings unless you set the Git email address to either <a href="!emailadmin">an address associated with your account</a> or the anonymized email provided below. Read <a href="!handbook">the handbook</a> for a full discussion of identifying yourself to Git. We recommend:',[