function test_get_users_by_email_with_multiple_matches() { $user1 = new WP_User($this->user_id); $user2_id = wp_create_user('bbb', 'password', '*****@*****.**'); $user2 = get_user_by('id', $user2_id); $user3_id = wp_create_user('ccc', 'password', '*****@*****.**'); $user3 = new WP_User($user3_id); $expected = array($user1, $user2, $user3); $this->assertEquals($expected, c2c_get_users_by_email('*****@*****.**')); $this->assertEquals($expected, c2c_AllowMultipleAccounts::get_instance()->get_users_by_email('*****@*****.**')); }
function get_users_by_email($email) { _deprecated_function(__FUNCTION__, '2.0', 'c2c_get_users_by_email'); return c2c_get_users_by_email($email); }