- Edited
HelloFirst time post here.I am currently working on an issue in OSTicket version 1.9.8.1.We are using active directory (AD) to automatically authenticate a user and if that comes back as true and we get their user data, it will automatically create an account.The issue we were having was it would authenticate and send back the appropriate data. Inside file /includes/class.auth.php on line 107 is this piece of code:if ($this_form->isValid(function($f) { return !$f->get('private'); })
&& ($U = User:($this_form->getClean()))
&& ($acct = ClientAccount:($U, $defaults))
// Confirm and save the account
&& $acct->confirm()
// Login, since `tickets.php` will not attempt SSO
&& ($cl = new ClientSession(new EndUser($U)))
&& ($bk->login($cl, $bk)))
return $cl;My question is the anonymous function at:function($f) { return !$f->get('private');Can someone tell me what it is trying to do? If I was able to break out this long statement into this: $U = User:($this_form->getClean()); $acct = ClientAccount:($U, $defaults); $acct->confirm(); $cl = new ClientSession(new EndUser($U)); $bk->login($cl, $bk);I had no problems in creating the account and logging in but it appears the anonymous function is not liking it and therefore not auto creating the account. I was able to checkthe response from that anonymous function and it was 0.If someone could maybe explain what the anonymous function is doing or checking for, I can get a better understanding.Thanking anyone who comments on this in advance.