WordPress.org

Ready to get started?Download WordPress

Forums

Expire User Passwords
Feature addon (1 post)

  1. hiphopsmurf
    Member
    Posted 2 years ago #

    Adding a function to require the reset of all passwords would be great. This is the code that I used on a multisite install:

    $sort= "user_registered";
    
    //Build the custom database query to fetch all user IDs
    $all_users_id = $wpdb->get_col( $wpdb->prepare("SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY %s ASC", $sort ));
    
    //we got all the IDs, now loop through them to get individual IDs
    foreach ( $all_users_id as $i_users_id ) :
    $timestamp = 1331300040;
    update_user_meta( $i_users_id, 'tmg_aep', $timestamp );
    endforeach;

    http://wordpress.org/extend/plugins/auto-expire-passwords/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by hiphopsmurf
  • This topic is not a support question
  • WordPress version: 3.3.2