mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-17 21:53:43 +09:00
Set gravatar for new registered users
This commit is contained in:
@@ -1106,4 +1106,22 @@ class UM_User {
|
||||
return $user_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set gravatar hash id
|
||||
*/
|
||||
function set_gravatar( $user_id ){
|
||||
|
||||
um_fetch_user( $user_id );
|
||||
$email_address = um_user('user_email');
|
||||
$hash_email_address = '';
|
||||
|
||||
if( $email_address ){
|
||||
$hash_email_address = md5( $email_address );
|
||||
$this->profile['synced_gravatar_hashed_id'] = $hash_email_address;
|
||||
$this->update_usermeta_info('synced_gravatar_hashed_id');
|
||||
}
|
||||
|
||||
return $hash_email_address;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user