Example #1
0
 public function get_inventory()
 {
     $inventory = InventoryFolder::where_agentID($this->principalid)->get();
     $items = InventoryItem::where_avatarID($this->principalid)->get();
     $items_array = array();
     foreach ($items as $item) {
         $i = array('assetid' => $item->assetid, 'assettype' => $item->assettype, 'inventoryname' => $item->inventoryname, 'inventorydescription' => $item->inventorydescription, 'inventorynextpermissions' => $item->inventorynextpermissions, 'inventorycurrentpermissions' => $item->inventorycurrentpermissions, 'invtype' => $item->invtype, 'creatorid' => $item->creatorid, 'inventorybasepermissions' => $item->inventorybasepermissions, 'inventoryeveryonepermissions' => $item->inventoryeveryonepermissions, 'saleprice' => $item->saleprice, 'saletype' => $item->saletype, 'creationdate' => $item->creationdate, 'groupid' => $item->groupid, 'groupowned' => $item->groupowned, 'flags' => $item->flags, 'inventoryid' => $item->inventoryid, 'avatarid' => $item->avatarid, 'parentfolderid' => $item->parentfolderid, 'inventorygrouppermissions' => $item->inventorygrouppermissions);
         $items_array[$item->parentfolderid] = $i;
     }
     $new_array = array();
     foreach ($inventory as $inventory_folder) {
         $f = array('foldername' => $inventory_folder->foldername, 'type' => $inventory_folder->type, 'version' => $inventory_folder->version, 'folderid' => $inventory_folder->folderid, 'agentid' => $inventory_folder->agentid, 'parentfolderid' => $inventory_folder->parentfolderid, 'items' => array());
         $new_array[$inventory_folder->folderid] = $f;
     }
     //ff($this->buildTree($new_array, $items_array));
 }
Example #2
0
 public function destroy_account($user)
 {
     // Authentication
     $account_auth = \Opensim\Model\Os\Auth::where_UUID($user->uuid);
     $account_auth->delete();
     // Avatars
     $account_avatar = \Opensim\Model\Os\Avatar::where_PrincipalID($user->uuid);
     $account_avatar->delete();
     // Friends
     $account_friend = \Opensim\Model\Os\Friend::where_PrincipalID($user->uuid);
     $account_friend->delete();
     // GridUser
     $account_griduser = \Opensim\Model\Os\Griduser::where_UserID($user->uuid);
     $account_griduser->delete();
     // InventoryFolders
     $account_inventoryfolder = \Opensim\Model\Os\InventoryFolder::where_agentID($user->uuid);
     $account_inventoryfolder->delete();
     // InventoryItems
     $account_inventoryitem = \Opensim\Model\Os\InventoryItem::where_avatarID($user->uuid);
     $account_inventoryitem->delete();
     // Presence
     $account_presence = \Opensim\Model\Os\Presence::where_UserID($user->uuid);
     $account_presence->delete();
     // Tokens
     $account_token = \Opensim\Model\Os\Token::where_UUID($user->uuid);
     $account_token->delete();
     // UserAccounts
     $account_useraccount = \Opensim\Model\Os\UserAccount::where_PrincipalID($user->uuid);
     $account_useraccount->delete();
 }