Improving rules


show more Improving rules provides you with in-depth training on Developer. Taught by Tom Geller as part of the Drupal 7 Advanced Training show less
please wait ...

Improving rules

In the last video, we created a rule that prevented people from changing their usernames to include the word foo in them, but although it basically worked, it had several problems. In this video, I am going to go improve and debug that rule. We won't be able to solve every problem, but we will get pretty far. This is a process that you'll find yourself doing quite a lot, so it's worth showing with a practical example. Once again, just to outline exactly what we did, we created a user named nonstaff. We also created a Staff role here.

The idea is that only people with the Staff role should be able to change their name to include foo somewhere in the name. I will sign in as nonstaff, and show what happens if somebody tries to change their name who is not a staff person. Go up to My account > Edit, change it to foo, and Save. It stays as nonstaff, and we get this warning message. But the first problem is that that affects all users.

It also happens to people who do have the S...

Improving rules
Video duration: 9m 10s 7h 50m Intermediate

Viewers:

Improving rules provides you with in-depth training on Developer. Taught by Tom Geller as part of the Drupal 7 Advanced Training

Subjects:
Developer Web
Software:
Drupal
Author:
please wait ...