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;
restrict csv download
Re: restrict csv download
Try changing the if statement to this:
Code: Select all
if(in_array($memberInfo['username'], $csvusers)){
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.