Is it possible to snow the Legal only at user registration???
Cause every time, i edit the profile, the legal acception appears.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | legal-user-registration-1786582-4.patch | 2.01 KB | gaurav.goyal |
Is it possible to snow the Legal only at user registration???
Cause every time, i edit the profile, the legal acception appears.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | legal-user-registration-1786582-4.patch | 2.01 KB | gaurav.goyal |
Comments
Comment #1
Sabareesh commentedI opted to go with form alter to remove the Terms and condition generated by the legal module in the profile edit page. By I find it quite hard to know that the legal module's terms and condition is not present in the $form in hook_form_alter(). Hence I went with CSS to hide the terms and conditions in the registration/ profile page.
In case of any other better method please do mention.
Comment #2
haggins commentedYou can't find the legal key of
$forminhook_form_user_profile_form_alterbecause legal uses this hook on it's own. So your module needs a higher weight so that your code gets called later on.If you have a custom module, the following code will ensure your modules weight gets set to the right value on module installation:
yourmodule.installThere's also a module for this: Modules Weight
However, it would be great if there was just a checkbox on the settings page to let the site builder decide whether T&C should be shown at the user profile or not. So I turn this issue into a feature request.
Comment #3
haggins commentedComment #4
gaurav.goyal commentedPatch Applied for above feature request,
Added a option in config form for showing the legal form on user profile page.
Comment #5
gaurav.goyal commentedComment #7
chansionjoe commented+1
Comment #8
safallia joseph commentedPatch in https://www.drupal.org/node/1703336#comment-11789565, provides a settings form to set the user roles to exclude the Legal on profile edit pages.
Comment #9
safallia joseph commentedComment #12
robert castelo commentedThanks for the patch Gaurav Goyal, I'm including it in the dev branch with a few chages:
* Moved it to the Legal Configuration page
* Namespaced the variable to begin with 'legal_' to avoid clashes with other modules
* Unset the variable in module uninstal function
* Set variable default to 1 on Profile page form