Project

General

Profile

Bug #3157 » 3157.patch

krileon, 18 January 2012 15:59

View differences:

administrator/components/com_comprofiler/plugin.foundation.php
$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;
......
$var = null;
}
}
if ( is_array( $var ) ) {
$var = implode( '|*|', $var );
}
} else {
$var = null;
}
......
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 {
......
$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 ) ) {
......
$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 );
......
$var = null;
}
}
if ( is_array( $var ) ) {
$var = implode( '|*|', $var );
}
return $var;
break;
case 'userfield':
(2-2/3)