restrict csv download
Posted: 2017-09-20 12:59
hi board, i used the sample code to restrict the csv download to a group here -http://bigprof.com/appgini/help/advance ... lename_csv
I now need to amend this to certain users so i tried to modify but it does not allow anyone to download, the update i made is below, can you help me?
function AP_master_data_init(&$options, $memberInfo, &$args){
$csvusers = array("123456789", "uk", "europe");
if(in_array($memberInfo['username']==$csvusers)){
$options->AllowCSV=1;
}else{
$options->AllowCSV=0;
}
return TRUE;
I now need to amend this to certain users so i tried to modify but it does not allow anyone to download, the update i made is below, can you help me?
function AP_master_data_init(&$options, $memberInfo, &$args){
$csvusers = array("123456789", "uk", "europe");
if(in_array($memberInfo['username']==$csvusers)){
$options->AllowCSV=1;
}else{
$options->AllowCSV=0;
}
return TRUE;