vamsi_j Posted January 2, 2007 Share Posted January 2, 2007 how should i fetch the email address from NIS authentication.function getUserByName($user){ $fullname = yp_match (yp_get_default_domain(), "passwd.byname", $user); if ( ! empty ( $fullname ) ) { $fullname = explode ( ":", $fullname ); return $fullname[4]; } else { return $user; }}I have an unix command ypcat -k aliases | grep $Username which prints the username and email address.I dont know how to embed it in PHP..is there anyway to fetch the email like the username which i have done above.Please help.,. Link to comment https://forums.phpfreaks.com/topic/32555-email-address-from-nis-authentication/ Share on other sites More sharing options...
trq Posted January 2, 2007 Share Posted January 2, 2007 [quote]I dont know how to embed it in PHP[/quote]Maybe [url=http://php.net/shell_exec]shell_exec[/url] will help. Link to comment https://forums.phpfreaks.com/topic/32555-email-address-from-nis-authentication/#findComment-151362 Share on other sites More sharing options...
vamsi_j Posted January 2, 2007 Author Share Posted January 2, 2007 or else is there any function to get the email address apart from the way which i have mentioned. Link to comment https://forums.phpfreaks.com/topic/32555-email-address-from-nis-authentication/#findComment-151363 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.