query('DELETE FROM '.$wpdb->usermeta.' WHERE meta_key = "synced_gravatar_hashed_id" '); $wpdb->query('INSERT INTO '.$wpdb->usermeta.'(user_id, meta_key, meta_value) SELECT ID, "synced_gravatar_hashed_id", MD5( LOWER( TRIM(user_email) ) ) FROM '.$wpdb->users.' '); return true; } function admin_menu() { global $ultimatemember; $this->addon = $ultimatemember->addons['gravatar_transfer']; add_submenu_page('ultimatemember', $this->addon[0], $this->addon[0], 'manage_options', 'gravatar_transfer', array(&$this, 'content') ); } function um_admin_addon_hook( $hook ) { global $ultimatemember; switch( $hook ) { case 'gravatar_transfer': if( $this->gravatar_hash() ){ $this->content = '

Done. Process completed!

'; $result = count_users(); $this->content .= $result['total_users'] . ' user(s) changed.

'; } break; } } function admin_init() { if ( isset( $_REQUEST['um-addon-hook'] ) ) { $hook = $_REQUEST['um-addon-hook']; do_action("um_admin_addon_hook", $hook); } } function content() { $this->process_link = add_query_arg('um-addon-hook','gravatar_transfer'); ?>

Ultimate Member

addon[0]; ?>

content ) ) { echo $this->content; } else { ?>

This tool allows you to add gravatars to Ultimate Member users. This can help you to link gravatar photos to user accounts with their email address.

Depending on your users database, this could take a few moments. To start the process, click the following button.

Start adding gravatars