I am content lock enabled and working for all nodes but I am trying to figure out a way to prevent content from being locked if a user has certain criteria or any other condition. I am attempting to do this in a form_alter hook but that does not seem to be doing the trick.

for example:

function my_module_node_form_alter($form, $form_state) {
  if (user->hasSomeCondition() == true) {
  // prevent lock 
  }
}

Is this possible?

Thanks

Comments

awm created an issue. See original summary.

mattsqd’s picture

I submitted a patch for what I think you are asking for here https://www.drupal.org/project/content_lock/issues/3110385

smustgrave’s picture

Status: Active » Closed (duplicate)
Related issues: +#3209982: Missing content_lock.api.php

Problem is there is no API for the hooks of this module.