Changeset 19431 for extensions/user_mass_register/admin.php
- Timestamp:
- Dec 15, 2012, 12:16:18 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/user_mass_register/admin.php
r18826 r19431 73 73 if (isset($_POST['submit'])) 74 74 { 75 $ emails = explode("\n", $_POST['emails']);75 $lines = explode("\n", $_POST['users']); 76 76 77 77 $emails_to_create = array(); … … 80 80 $emails_created = array(); 81 81 $emails_on_error = array(); 82 83 foreach ($emails as $email) 84 { 82 $username_for = array(); 83 84 foreach ($lines as $line) 85 { 86 $fields = explode(';', $line); 87 $email = trim($fields[0]); 88 89 if (isset($fields[1])) 90 { 91 $username_for[$email] = trim($fields[1]); 92 } 93 85 94 $email = trim($email); 86 95 … … 108 117 { 109 118 // find a username 110 list($base_username,) = explode('@', $email); 119 if (isset($username_for[$email])) 120 { 121 $username = $username_for[$email]; 122 } 123 else 124 { 125 list($username,) = explode('@', $email); 126 } 111 127 112 $ username = $base_username;128 $base_username = $username; 113 129 $i = 2; 114 130 while (get_userid($username))
Note: See TracChangeset
for help on using the changeset viewer.