authenticate() public method

Authenticate user.
public authenticate ( array $data, array $post ) : boolean
$data array Form data.
$post array Additional form fields.
return boolean
 /**
  * Handle login.
  *
  * @return bool True if the action was performed.
  */
 protected function taskLogin()
 {
     $this->data['username'] = strip_tags(strtolower($this->data['username']));
     if ($this->admin->authenticate($this->data, $this->post)) {
         // should never reach here, redirects first
     } else {
         $this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.LOGIN_FAILED'), 'error');
     }
     return true;
 }