When user has not accepted any version of the conditions, the following error will be shown:
Notice: Undefined variable: accepted in legal_form_user_profile_form_alter() (line 296 of /var/www/domains/united.com/branddev/htdocs/sites/all/modules/legal/legal.module).
Notice: Undefined variable: accepted in legal_form_user_profile_form_alter() (line 310 of /var/www/domains/united.com/branddev/htdocs/sites/all/modules/legal/legal.module).
Notice: Undefined variable: accepted in legal_form_user_profile_form_alter() (line 336 of /var/www/domains/united.com/branddev/htdocs/sites/all/modules/legal/legal.module).
The variable could simply be initialized, but I think legal_form_user_profile_form_alter could use some refactoring/fixing.
Comments
Comment #1
onegenius commentedThis is because user accounts were already created before the legal module was installed. Yes, it need to be initialized.
Comment #2
tboornaz commentedI am getting the same issue. When the a user goes to the log in in page... this warning is displaying.
Comment #3
vadzen commentedLegal version:
Legal (legal) Enabled 7.x-1.2+4-d
I have the same issue.
Comment #4
chrisjlee commentedDuplicate of #1356822: Notice: Undefined variable: accepted in legal_form_user_profile_form_alter()