Last active
December 23, 2015 08:19
-
-
Save alexdrupal/6606429 to your computer and use it in GitHub Desktop.
Views Contextual filter values to display a list of users with today's birthday
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $results = db_query("SELECT entity_id FROM field_data_field_birthday WHERE DATE_FORMAT(field_birthday_value,'%m-%d') = DATE_FORMAT(NOW(),'%m-%d') AND entity_type = 'user'"); | |
| $ids = array(); | |
| foreach ($results as $result) { | |
| $ids[] = $result->entity_id; | |
| } | |
| return implode(',',$ids); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment