Changeset 1391594
- Timestamp:
- 04/10/2016 07:17:17 PM (10 years ago)
- Location:
- members-import/trunk
- Files:
-
- 2 edited
-
members-import.php (modified) (9 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
members-import/trunk/members-import.php
r1086650 r1391594 5 5 Plugin URI: 6 6 Description: Allows the batch importation of users/members via an uploaded CSV file. 7 Author: Soumi Das7 Author: Manish Kumar Agarwal 8 8 Author URI: http://www.youngtechleads.com 9 Version: 1. 110 Author Emailid: soumi.das1990@gmail.com/skype:soumibgb9 Version: 1.2 10 Author Emailid: manishkrag@yahoo.co.in/skype:mfsi_manish 11 11 */ 12 12 13 require_once( './password-change-mandatory.php' ); 13 14 14 15 // add admin menu … … 34 35 ); 35 36 if (!current_user_can('manage_options')) 36 wp_die( __('You do not have sufficient permissions to access this page.') );37 wp_die( __('You do not have sufficient permissions to access this page.') ); 37 38 38 39 // if the form is submitted … … 41 42 $arr_rows = file($_FILES['csv_file']['tmp_name']); 42 43 $login_username = isset( $_POST['login_username'] ) ? $_POST['login_username'] : false; 43 $password_nag = isset( $_POST['password_nag'] ) ? $_POST['password_nag'] : false; 44 44 45 $new_member_notification = isset( $_POST['new_member_notification'] ) ? $_POST['new_member_notification'] : false; 45 46 … … 120 121 } 121 122 122 // If we created a new user, maybe set password nag and send new user notification?123 if ( $password_nag )124 update_user_option( $user_id, 'default_password_nag', true, true );125 126 123 if ( $new_member_notification ) 127 124 wp_new_user_notification( $user_id, $userdata['user_pass'] ); … … 129 126 $user_ids[] = $user_id; 130 127 } 131 132 } // end of 'for each around arr_rows' 128 } // end of 'foreach around arr_rows' 133 129 134 130 if( $flag == 1 ) { … … 146 142 else 147 143 $html_message = "<div class='updated' style='color: red'>It seems the file was not uploaded correctly.</div>"; 148 } // end of 'if mode is submit' 149 144 } // end of 'if mode is submit' 150 145 151 146 ?> … … 155 150 <h2>CSV Members Import</h2> 156 151 <p>Please select the CSV file you want to import below.</p> 157 152 158 153 <form action="users.php?page=members-import" method="post" enctype="multipart/form-data"> 159 154 <input type="hidden" name="mode" value="submit"> … … 181 176 </td> 182 177 </tr> 183 <tr valign="top">184 <th scope="row">Password nag: </th>185 <td>186 <label for="password_nag">187 <input id="password_nag" name="password_nag" type="checkbox" value="1" />188 Show password nag on new users signon.189 </label>190 </td>191 </tr>192 178 <tr> 193 179 <th scope="row">Notice: </th> … … 204 190 <?php 205 191 } // end of 'function memberimport_page()' 206 ?> -
members-import/trunk/readme.txt
r1228021 r1391594 1 1 === Members Import === 2 Contributors: soumidas2 Contributors: manishkrag 3 3 Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=soumi.das1990@gmail.com&item_name=Members%20Import%20&return=http://www.youngtechleads.com/thanks/ 4 4 Tags: csv, user, import, users, member, members, batch, batch import, batch import members, batch import users, one click user creation, import csv, import from csv, user registration, wordpress members import,wordpress csv import, wordpress users import, buddypress, buddypress members import 5 Stable tag: 1. 16 Tested up to: 4. 35 Stable tag: 1.2 6 Tested up to: 4.5 7 7 8 8 This plug-in allows you to batch import of users/members taken from an uploaded CSV file.
Note: See TracChangeset
for help on using the changeset viewer.