When an anonymous user views content I get the following error. I think this may be related to a custom module, but disabling still produces the error.

Error does not show for authenticated user. Any help is greatly appreciated.

•Notice: Undefined index: und in eval() (line 4 of /home/my4hbook/public_html/demo/sites/all/modules/cck/cck.module(304) : eval()'d code).
•Warning: Invalid argument supplied for foreach() in eval() (line 4 of /home/my4hbook/public_html/demo/sites/all/modules/cck/cck.module(304) : eval()'d code).

Comments

Pun-1’s picture

Update - I've tracked it down to this code for a field - which should return a list of users "projects" from their account....

global $user;
$user_data = user_load($user->uid);
$values = array();
foreach($user_data->field_user_projects['und'] as $option){
$values[$option['value']] = $option['value'];