Can I ask you why are you recalculating user sharing privileges after insert a new user?<br><br>Cheers<br><br>Nicolas<br><br><div class="gmail_quote">2012/1/27 Adam Heinz <span dir="ltr">&lt;<a href="mailto:amh@metricwise.net">amh@metricwise.net</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Time to get another frequent user request off my plate!  We currently are forced to postpone recalculation of sharing rules until the evenings when the system is under lighter load.  This means that if a new user is added in the morning, their permissions aren&#39;t properly configured until the next day.<div>

<br></div><div>What I plan to prototype here is first to encapsulate privilege access inside a class instead of require(&#39;user_privileges/user_privileges_&#39;.$current_user-&gt;id.&#39;.php&#39;) all over the place.  From there, I plan to experiment with using ADOdb caching (<a href="http://phplens.com/lens/adodb/docs-adodb.htm#caching" target="_blank">http://phplens.com/lens/adodb/docs-adodb.htm#caching</a>) -- flushing the cache when privileges are changed, then allowing them to lazy load as needed by the application.</div>

<div><br></div><div>I&#39;ll open a ticket and start submitting patches as soon as I have anything worth showing.  Comments welcome!</div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br>