note 118958 added to function.imap-setacl

From: Date: Mon, 07 Mar 2016 14:46:50 +0000
Subject: note 118958 added to function.imap-setacl
Groups: php.notes 
Request: Send a blank email to php-notes+get-205111@lists.php.net to get a copy of this message
After getting the ACL's from imap_getacl you want to set them for a user on any mailbox folder like this: foreach ( $Folders as $key => $Maildir ) { imap_setacl($domains , "user/john.doe/".$Maildir , $userid, "lrswipkxte"); } You can use a form that translates the ACLs like the following (thanks to cyradm manual): switch ($right) { case "read" : $aclstring = "lrs"; break; case "post" : $aclstring = "lrsp"; break; case "append" : $aclstring = "lrsip"; break; case "write" : $aclstring = "lrswipkxte"; break; case "delete" : $aclstring = "lrxte"; break; case "all" : $aclstring = "lrswipkxte"; break; case "admin" : $aclstring = "lrswipkxtea"; break; case "none" : $aclstring = ""; break; } ---- Server IP: 72.52.91.14 Probable Submitter: 212.243.178.130 ---- Manual Page -- http://php.net/manual/en/function.imap-setacl.php Edit -- https://master.php.net/note/edit/118958 Del: integrated -- https://master.php.net/note/delete/118958/integrated Del: useless -- https://master.php.net/note/delete/118958/useless Del: bad code -- https://master.php.net/note/delete/118958/bad+code Del: spam -- https://master.php.net/note/delete/118958/spam Del: non-english -- https://master.php.net/note/delete/118958/non-english Del: in docs -- https://master.php.net/note/delete/118958/in+docs Del: other reasons-- https://master.php.net/note/delete/118958 Reject -- https://master.php.net/note/reject/118958 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#205111) next »