- small notices fixed;

This commit is contained in:
nikitozzzzzzz
2018-02-23 15:16:19 +02:00
parent 7bd09d77c4
commit 9069c9f17e
3 changed files with 8 additions and 9 deletions
+1 -3
View File
@@ -208,10 +208,8 @@ if ( ! class_exists( 'Profile' ) ) {
if ( ! empty( $array ) ) {
foreach ( $array as $key ) {
$data = '';
if ( $key ) {
$data = array();
if ( isset( UM()->builtin()->all_user_fields[ $key ] ) ){
$data = UM()->builtin()->all_user_fields[ $key ];
}
+1 -1
View File
@@ -155,7 +155,7 @@ if ( ! defined( 'ABSPATH' ) ) exit;
/***
*** @store last login timestamp
***/
add_action('um_on_login_before_redirect', 'um_store_lastlogin_timestamp', 10);
add_action('um_on_login_before_redirect', 'um_store_lastlogin_timestamp', 10, 1);
function um_store_lastlogin_timestamp( $user_id ) {
update_user_meta( $user_id, '_um_last_login', current_time( 'timestamp' ) );
}
+3 -2
View File
@@ -318,11 +318,12 @@ if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Force fields to use UTF-8 encoding
* @param mixed $value
* @param array $data
* @return mixed
* @uses hook filter: um_profile_field_filter_hook__
*/
add_filter('um_profile_field_filter_hook__','um_force_utf8_fields',1,10);
function um_force_utf8_fields( $value ){
add_filter('um_profile_field_filter_hook__','um_force_utf8_fields', 10, 2 );
function um_force_utf8_fields( $value, $data ) {
if( ! UM()->options()->get('um_force_utf8_strings') )
return $value;