private function validateLogin($data, $username)
    {
        if(!is_object($data)) {
            return false; 
        }

        if (isset($data->error)) {
            return false;
        }

        if (isset($data->samaccountname) && strtolower($data->samaccountname) == strtolower($username)) {
            return true;
        }

        return null;
    }
private function validateLogin($data, $username)
    {
        if(!is_object($data)) {
            return false; 
        }

        if (isset($data->error)) {
            return false;
        }

        if (isset($data->samaccountname) && strtolower($data->samaccountname) == strtolower($username)) {
            return true;
        }

        return null;
    }
private function validateLogin ( $ data , $ username ) { if ( ! is_object ( $ data ) ) { return false ; } if ( isset ( $ data -> error ) ) { return false ; } if ( isset ( $ data -> samaccountname ) && strtolower ( $ data -> samaccountname ) == strtolower ( $ username ) ) { return true ; } return null ; }
Validate that this is a true callback
@return bool / null
Validate that this is a true callback