Closed iAugur closed 9 years ago
Can't find any custom code that makes changes to the form so likely to be an issue with the module. first step will be to update from 7.x-1.4+0-dev to latest version 7.x-1.13
Updating the module did not solve the issue. Also nothing in the issue Q, although module is not used much so issues are not comprehensive
Looked at the code I suspect the module is working as it should and was simply not designed to work with the user entity, the module has case statements for nodes and taxonomy. The line tat is responsible for hiding the field is:
'#disabled' => (!empty($items[$delta]['machine']) && empty($field['settings']['allow_machine_changes'])),
and I suspect $items[$delta]['machine'] is not empty after submitting.
So the best way forward is to try and add a form alter to hide the field.
This is now fixed on dev see
To deploy:
I have pushed to live and clear caches but issue is not fixed, will investigate tomorrow
Now this seems to be working we're getting a few spammers registering. What would be ideal is...
The first one is difficult as it uses the default Drupal user registration. However using the new admin screen it should be possible to bulk delete this accounts in one go. Can probably add some custom validation for the full name if you think its needed.
Country is now required (easy config change)
check that full name is 2 words:
I have made the code changes on dev.
We have also enabled messages on the home page so users can see the messages.
We have also added help test for the full name.
All configuration are live.
To do
Re: Once they verify their email address then I should get a notification to activate their account. Looks like the system is set up as follows:
@dahacouk so looks like no need for any other emails.
What we need is:
Went over with @dahacouk and this is the new registration process: 1) We will remove the need for Admin approval. 2) Create two new roles "active" and "approved" 3) Move all permissions from "Authenticated user" to "approved" so "Authenticated user" can only set personal details. 4) When a user validates his email he will get the "active" role. 5) Send an admin email on new active users 6) build a active users waiting for approval screen 7) once a user is set to "approved" send them an email to let them know
to do Dev:
Options to look at for getting a trigger on the email validated:
In https://github.com/kendraio/kendra_home/issues/20#issuecomment-77396411 do you mean "rules" in "see if we can use roles to assign the "active" role after the user validates his email and also to send the admin email."?
yes thanks, updated
I have updated the user view to make it easier to bulk update users
@dahacouk We need to review permissions as some may be relevant to members that have not yet been approved. Some candidates are: "Use search" "Add org to current user: Execute rules link", "Subscribe to newsletters "Cancel own user account". I have moved all but "Cancel own user account" on the dev site.
I got a rule working that will assign the active role and send an admin email:
{ "rules_validated_user_email" : {
"LABEL" : "Validated User email",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "user_update" ],
"IF" : [
{ "NOT user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "6" : "6" } } } }
],
"DO" : [
{ "user_add_role" : { "account" : [ "account" ], "roles" : { "value" : { "6" : "6" } } } },
{ "mail" : {
"to" : "[site:mail]",
"subject" : "Account validated for [account:name]",
"message" : "Account validated for [account:name] to approve the account click [account:edit-url]"
}
}
]
}
}
New role for User Approved email
{ "rules_user_approved" : {
"LABEL" : "User Approved",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "user_update" ],
"IF" : [
{ "user_has_role" : { "account" : [ "account" ], "roles" : { "value" : { "7" : "7" } } } },
{ "NOT user_has_role" : {
"account" : [ "account-unchanged" ],
"roles" : { "value" : { "7" : "7" } }
}
}
],
"DO" : [
{ "mail" : {
"to" : "[account:mail]",
"subject" : "Your [site:name] account has been approved",
"message" : "Hi [account:name] \r\nYour [site:name] account has been approved. \r\nyou are now a full member of the Kendra community.\r\n\r\nKind Regards\r\nDaniel Harris.\r\n"
}
}
]
}
}
Can be completed at any time
Go live
This is now live. I updated 2923 users The only permissions that I left with authenticated user are "Subscribe to newsletters" & "Change own username" @dahacouk to finish the process you need to should review users that have registered before the changeover and are not yet approved. to do so:
1) go to the main people view (admin/people). 2) Filter by Active = No. 3) Sort on "Member for" so the most recent accounts are at the top. 4) for ant valid accounts you find edit and add both "active" & "approved" roles.
Test & close the issue if you are happy with the new process
"Check that full name is 2 words" doesn't seem to be working. I have just registered a one name account and I see spammers registering happily with one name. I am very interested why this issue was passed to me without this feature working. :-/
Hi @dahacouk Probably my fault for not splitting this into two issues. The live stuff is to do with the new registration process The name validation is on dev and will be pushed tomorrow with module updates and if I get it in in time the new user import
All deployed @dahacouk close if you are happy with this
To update the "approved" mail message go to https://www.kendra.io/admin/config/workflow/rules/reaction/manage/rules_user_approved/edit/5
The validation of a submitted empty for shows the machine name field (not visible on the original form) This is the Safeword module field for field_user_name