Issue #2231495 by ACF, andrei.dincu: Array to string conversion error when trying to add a new user.
parent
068dd7138f
commit
562addafa0
|
@ -208,7 +208,9 @@ function contact_form_user_form_alter(&$form, &$form_state) {
|
|||
'#weight' => 5,
|
||||
);
|
||||
$account = $form_state['controller']->getEntity();
|
||||
$account_data = !\Drupal::currentUser()->isAnonymous() ? \Drupal::service('user.data')->get('contact', $account->id(), 'enabled') : NULL;
|
||||
if (!\Drupal::currentUser()->isAnonymous() && $account->id()) {
|
||||
$account_data = \Drupal::service('user.data')->get('contact', $account->id(), 'enabled');
|
||||
}
|
||||
$form['contact']['contact'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Personal contact form'),
|
||||
|
|
|
@ -19,7 +19,7 @@ class UserCreateTest extends WebTestBase {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array('image');
|
||||
public static $modules = array('image', 'contact');
|
||||
|
||||
public static function getInfo() {
|
||||
return array(
|
||||
|
|
Loading…
Reference in New Issue