<div dir="ltr"><div>If there are some sharing access rules, as example, private records for one role and in custom rules you add the function to view and/or edit records for another roles it doesnt work if a new user is created. <br></div><div><br></div><div>For this purpose i add this code to /modules/Users/Users.php in function save</div><div><br></div><div>              $result = $this->db->pquery('SELECT id FROM vtiger_users WHERE deleted = ?', array(0));<br>         $numOfRows = $this->db->num_rows($result);<br><br>            for($i=0; $i<$numOfRows; $i++) {<br>                   require_once('modules/Users/CreateUserPrivilegeFile.php');<br>                    createUserSharingPrivilegesfile($this->db->query_result($result, $i, 'id'));<br>            }</div><div><br></div><div>If someone has this issue this will works.  Also, If someone can put it on <a href="http://code.vtiger.com">code.vtiger.com</a> will useful.<br></div></div>