Opened 10 years ago
Last modified 7 years ago
#37338 new enhancement
add filter in get_data_by
| Reported by: | muhammadn | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Users | Version: | 4.5.3 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Basically I need to encrypt user_email field in the database,
I can enrypt them using following filters:
email_change_email
pre_user_email
now what i need is to decrypt them when getting retrieved from database,
as far as I say in the core, this may be done by applying a new filter in wp-includes\class-wp-user.php#get_data_by( $field, $value ) method, right before this line
update_user_caches( $user ); (LN:239)
for this to work, $value needs to be filtered based on $field as well (cause this is the value that sits in the query in Line# 235, so I think three filters in Line# 207 switch branches should do the trick.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)