When creating new wp user set nickname 'fname lname'
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 2 Aug 2018 19:42:28 +0000 (15:42 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 3 Aug 2018 17:27:41 +0000 (13:27 -0400)
Setting the nickname of new wordpress users  to 'fname lname'

models/admin/contacts/index.php

index 9ffb3ba..f3c82f8 100644 (file)
@@ -338,10 +338,11 @@ class GlmMembersAdmin_contacts_index extends GlmDataContacts
                             array(
                                 'user_email' => $contactInfo['fieldData']['email'],
                                 'user_login' => $contactInfo['fieldData']['username'],
-                                'user_pass' => trim($_REQUEST['password']),
+                                'user_pass'  => trim($_REQUEST['password']),
                                 'first_name' => $contactInfo['fieldData']['fname'],
-                                'last_name' => $contactInfo['fieldData']['lname'],
-                                'role' => $wpRole
+                                'last_name'  => $contactInfo['fieldData']['lname'],
+                                'nickname'   => $contactInfo['fieldData']['fname'] . ' ' . $contactInfo['fieldData']['lname'],
+                                'role'       => $wpRole
                             )
                         );