Elgg  Version 4.3
DisablePasswordAutocompleteHandler.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Input;
4 
11 
19  public function __invoke(\Elgg\Hook $hook) {
20  if (!_elgg_services()->config->security_disable_password_autocomplete) {
21  return;
22  }
23 
24  $return_value = $hook->getValue();
25 
26  $return_value['autocomplete'] = 'off';
27 
28  return $return_value;
29  }
30 }
Models an event passed to hook handlers.
Definition: Hook.php:11
__invoke(\Elgg\Hook $hook)
Disable the autocomplete feature on password fields.
_elgg_services()
Get the global service provider.
Definition: elgglib.php:638
Disables password autocomplete for input/password.