I have many roles with complicated role names, and this breaks the HTML when I save the settings form:
<div id="edit-google-adwords-track-Medlem,-æble.dk-wrapper" class="form-item form-option">
<label for="edit-google-adwords-track-Medlem,-æble.dk" class="option"><input type="checkbox" class="form-checkbox" value="1" id="edit-google-adwords-track-Medlem,-æble.dk" name="google_adwords_track_Medlem,_æble.dk"> Medlem, æble.dk</label> </div>
I think you should switch to using role id, as seems to be the standard in e.g. the googleanalytics-module. As it is now, I am unable to enable Adwords tracking (via the UI) for roles with a dot in their name.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | use_rid_not_role-1127148-2.patch | 2.64 KB | firebus |
Comments
Comment #1
firebus commented+1 role id should be used here, not role name
Comment #2
firebus commentedhere's a patch that replaces role with rid.
there's also an update hook to update variables for existing users.
finally i replaced the db_query select on {roles} with a call to user_roles()
Comment #3
jasonsavino commentedpatch tested and committed to dev branch