# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. --- administrator/components/com_comprofiler/plugin.foundation.php +++ administrator/components/com_comprofiler/plugin.foundation.php @@ -1419,9 +1419,6 @@ $var = $user->getField( $field, null, 'php', 'none', 'profile', 0, true ); // allow accessing all fields in the if if ( is_array( $var ) ) { $var = array_shift( $var ); - if ( is_array( $var ) ) { - $var = implode( '|*|', $var ); - } } elseif ( isset( $user->_cbuser->$field ) ) { // fall-back to the record if it exists: $var = $user->_cbuser->$field; @@ -1434,6 +1431,9 @@ $var = null; } } + if ( is_array( $var ) ) { + $var = implode( '|*|', $var ); + } } else { $var = null; } @@ -1514,10 +1514,6 @@ if ( is_array( $val ) ) { $val = array_shift( $val ); - - if ( is_array( $val ) ) { - $val = implode( '|*|', $val ); - } } elseif ( isset( $this->_cbuser->$input[1] ) ) { $val = $this->_cbuser->get( $input[1] ); } else { @@ -1528,6 +1524,9 @@ $val = array(); // avoid substitution } } + if ( is_array( $val ) ) { + $val = implode( '|*|', $val ); + } if( ( ! is_object( $val ) ) && ( ! is_array( $val ) ) ) { if ( ! ( ( strtolower( $input[1] ) == 'password' ) && ( strlen( $val ) >= 32 ) ) ) { if ( is_array( $htmlspecialchars ) ) { @@ -1566,10 +1565,6 @@ $var = $user->getField( $field, $default, 'php', 'none', $reason, 0, true ); // allow accessing all fields in the data if ( is_array( $var ) ) { $var = array_shift( $var ); - - if ( is_array( $var ) ) { - $var = implode( '|*|', $var ); - } } elseif ( isset( $user->_cbuser->$field ) ) { // fall-back to the record if it exists: $var = $user->_cbuser->get( $field ); @@ -1582,6 +1577,9 @@ $var = null; } } + if ( is_array( $var ) ) { + $var = implode( '|*|', $var ); + } return $var; break; case 'userfield':