Hi,

Please help me.

I need to make user who have both account(iium_staff and iium_stadd) can view both file(notification.php refref to $grppriv = 1 and student_notification.php refer to $grppriv = 2.

How can user with 2 account can have this 2 file?

Please help me.

Actually the entire coding is like this

<?php
//ini_set(“display_errors”,“1”);

function checkMyPortalAccount($person) {
$ds=ldap_connect(“?...edu.my”,???); // assuming the LDAP server is on this host
$rldap=ldap_bind($ds,“cn=o???”, “????”);
$grppriv = 0;
//$person=$_GET[‘id’];

$dn = “cn=portal.070326.174828.069396000,cn=Groups,dc=iiu,dc=edu,dc=my”;
$filter=”(uniquemember=cn=$person*)”;

$sr=ldap_search($ds, $dn, $filter);

$info = ldap_get_entries($ds, $sr);
for ($i=0; $i<$info[“count”]; $i++) {
$grp = explode(”,”,$info[$i][dn]);
if (eregi(“iium_staff”,$grp[0])) {
$grppriv = 1;

} if (eregi(“iium_stadd”,$grp[0])) {
$grppriv = 2;

} elseif (eregi(“iium_stadd”,$grp[0])) and (eregi(“iium_staff”,$grp[0])) {
$grppriv = 1;
$grppriv = 2;
}
}

return $grppriv;
}
?>

Thank you