Jump to content

email address from nis authentication


vamsi_j

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.