Title: Complex condition not working
Last modified: November 16, 2021

---

# Complex condition not working

 *  [bmontgomery](https://wordpress.org/support/users/bmontgomery/)
 * (@bmontgomery)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/complex-condition-not-working/)
 * Hello,
 * I’m trying to have this plugin work.
    Basically it’s pretty good but I’m still
   facing issues with user rights and roles. So I decided to test the plugin using
   the test.php script.
 * I tried the example condition that is given in the documentation, which is :
   `
   $condition = '[(CAS{cas_user_id} -EQ "mbrown") -AND (CAS{email} -CONTAINS "my-
   university.fr")] -OR (CAS{cas_user_id} -STARTWITH "test")';`
 * For the user, I have :
 *     ```
       $mock_cas_object = array(
       	'cas_user_id' => '123',
       	'first_name' => 'Brian',
       	'email' => 'brian@gmail.com',
       );
       ```
   
 * When I run the test, the response is true, while it shouldn’t.
    I don’t understand
   why, as I copied/pasted it from the doc.
 * Any idea of what may be wrong ?

The topic ‘Complex condition not working’ is closed to new replies.

 * ![](https://ps.w.org/wp-cassify/assets/icon-256x256.png?rev=3112582)
 * [WP Cassify](https://wordpress.org/plugins/wp-cassify/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cassify/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cassify/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cassify/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cassify/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cassify/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [bmontgomery](https://wordpress.org/support/users/bmontgomery/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/complex-condition-not-working/)
 * Status: not resolved