Skip to:
Content

bbPress.org

Ticket #1886: 1886-2.diff

File 1886-2.diff, 957 bytes (added by netweb, 9 years ago)
  • bbp-includes/bbp-user-functions.php

    function bbp_user_maybe_convert_pass() { 
    14551455  global $wpdb;
    14561456
    14571457  // Bail if no user password to convert
    1458   $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" );
     1458  $row = $wpdb->get_row( "SELECT * FROM {$wpdb->users} INNER JOIN {$wpdb->usermeta} ON user_id = ID WHERE meta_key = '_bbp_class' AND user_login = '{$username}' LIMIT 1" );
    14591459  if ( empty( $row ) || is_wp_error( $row ) )
    14601460   return;
    14611461
     1462  //Setup admin
     1463  require_once( bbpress()->plugin_dir . 'bbp-admin/bbp-admin.php' );
     1464
     1465  bbp_admin();
     1466
    14621467  // Convert password
    14631468  require_once( bbpress()->admin->admin_dir . 'bbp-converter.php' );
    14641469  require_once( bbpress()->admin->admin_dir . 'converters/' . $row->meta_value . '.php' );