I'm using a MODULE_preprocess_node function to modify the node template and I'm experiencing strange things.
Basically my idea was to prevent anonymous users from commenting more than once. In the preprocess function, I check if the current hostname (if anonymous) has a previously submitted comment for the current NID and if it does, I empty the comment form array.
But the problem is that, even when caching is disabled, I'm experiencing strange behavior. I'm not quite sure whether it's because of caching. I checked my
db_select call and it works.
Do you have any recommendation for me to prevent this from being happening ? May be I should ask if the output of
*_preprocess_* functions are cached at first place.
I do not have (core) caching enabled and I'm planning to do so. No other modules installed yet.
Thanks in advance.