public function getMemberFields(Member $member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        $result = array();

        if ($member) {
            foreach ($member->summaryFields() as $field => $title) {
                $result[$field] = $member->$field;
            }
        }

        if ($member && !array_key_exists('Name', $result)) {
            $result['Name'] = $member->getName();
        }

        return $result;
    }
public function getMemberFields(Member $member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        $result = array();

        if ($member) {
            foreach ($member->summaryFields() as $field => $title) {
                $result[$field] = $member->$field;
            }
        }

        if ($member && !array_key_exists('Name', $result)) {
            $result['Name'] = $member->getName();
        }

        return $result;
    }
public function getMemberFields ( Member $ member = null ) { if ( ! $ member ) { $ member = Security :: getCurrentUser ( ) ; } $ result = array ( ) ; if ( $ member ) { foreach ( $ member -> summaryFields ( ) as $ field => $ title ) { $ result [ $ field ] = $ member -> $ field ; } } if ( $ member && ! array_key_exists ( 'Name' , $ result ) ) { $ result [ 'Name' ] = $ member -> getName ( ) ; } return $ result ; }
Builds an array with the member information
@param Member $member An optional member to use. If null, will use the current logged in member
@return array
Builds an array with the member information