This should be possible. You just need a relationship called "notifyemail" or "notifysite" between user and a group. The name of the realtionship defines the notification method. The relationship can be added using add_entity_relationship() function.
add_entity_relationship($user_guid, 'notify' . $method, $group_guid);
Thanks buddy. It helps me a lot. Successfully done.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.