Changeset 4072 for branches/plugin/bbp-admin/bbp-converter.php
- Timestamp:
- 07/08/2012 10:48:17 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-admin/bbp-converter.php
r4055 r4072 62 62 // Attach the bbConverter admin settings action to the WordPress admin init action. 63 63 add_action( 'bbp_register_admin_settings', array( $this, 'register_admin_settings' ) ); 64 65 // Attach to the login process to aid in converting passwords to wordpress.66 add_action( 'login_form_login', array( $this, 'convert_pass' ) );67 64 68 65 // Attach to the admin ajax request to process cycles … … 475 472 476 473 break; 477 }478 }479 480 /**481 * Convert passwords from previous forum to wordpress.482 *483 * @since bbPress (r3813)484 * @global WPDB $wpdb485 */486 public function convert_pass() {487 488 $username = !empty( $_POST['log'] ) ? $_POST['log'] : '';489 490 if ( !empty( $username ) ) {491 492 global $wpdb;493 494 $row = $wpdb->get_row( "SELECT * FROM {$wpdb->users} INNER JOIN {$wpdb->usermeta} ON user_id = ID WHERE meta_key = '_bbp_converter_class' AND user_login = '{$username}' LIMIT 1" );495 496 if ( !empty( $row ) ) {497 $converter = bbp_new_converter( $row->meta_value );498 $converter->callback_pass( $username, $_POST['pwd'] );499 }500 474 } 501 475 }
Note: See TracChangeset
for help on using the changeset viewer.