diff --git a/kernel/classes/datatypes/ezuser/ezusertype.php b/kernel/classes/datatypes/ezuser/ezusertype.php index 1f4d38aee9c..921e7f65d3a 100644 --- a/kernel/classes/datatypes/ezuser/ezusertype.php +++ b/kernel/classes/datatypes/ezuser/ezusertype.php @@ -381,10 +381,10 @@ function objectAttributeContent( $contentObjectAttribute ) $user = eZUser::fetch( $userID ); eZDebugSetting::writeDebug( 'kernel-user', $user, 'user' ); - //Looking for a "draft" and loading its content + // Looking for a "draft" and loading its content $serializedDraft = $contentObjectAttribute->attribute( 'data_text' ); - if ( !empty( $serializedDraft ) ) + if ( $user instanceof eZUser && !empty( $serializedDraft ) ) { $user = $this->updateUserDraft( $user, $serializedDraft ); }