Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Is it possible to to invoke a rule this way?
So far I have not had any luck?
/* Implementation of hook_form_alter*/
function login_auth_form_alter(&$form, $form_state, $form_id) {
if ($form_id == 'user_login') {
$form['#validate'][] = 'ea_login';
}
}
/* implementation of hook_form_validate */
function ea_login($form, &$form_state) {
$response = rules_invoke('rules_my_rule', $args);
}
Comments
Comment #1
duit CreditAttribution: duit commentedThis works
/* Implementation of hook_form_alter*/
Comment #2
TR CreditAttribution: TR commented