Creates insert array

@param mixed $uid
@return array
971601
protected function createInsert($uid)
    {
        $field1 = rand(1, 2);
        $field2 = rand(0, 1);
        return [
            'user_id' => $uid,
            'name'    => $this->faker->text(20),
            'value'   => '{"field_1":"' . $field1 . '","field_2":"' . $field2 . '"}'
        ];
    }
1124172
public function buildFromTypeAndUid($type, $uid)
    {
        $systemHash = $this->getSystemHash();
        $variantId = $systemHash . '/' . $type . '/' . $uid;

        $variantId = $this->applyHook($variantId, $systemHash, $type, $uid);
        return $variantId;
    }
1111476
public static function getRootPid($uid = null)
    {
        static $cache = array();
        $ret = null;

        if ($uid === null) {
            #################
            # Current root PID
            #################
            $rootline = self::getRootLine();
            if (!empty($rootline[0])) {
                $ret = $rootline[0]['uid'];
            }
        } else {
            #################
            # Other root PID
            #################
            if (!isset($cache[$uid])) {
                $cache[$uid] = null;
                $rootline    = self::getRootLine($uid);

                if (!empty($rootline[0])) {
                    $cache[$uid] = $rootline[0]['uid'];
                }
            }

            $ret = $cache[$uid];
        }

        return $ret;
    }
1206939
protected function getBaseUser($uid)
    {
        $query = "SELECT email, password, isactive FROM {$this->config->table_users} WHERE id = :id";
        $query_prepared = $this->dbh->prepare($query);
        $query_prepared->execute(['id' => $uid]);

        $data = $query_prepared->fetch(\PDO::FETCH_ASSOC);

        if (!$data) {
            return false;
        }

        $data['uid'] = $uid;

        return $data;
    }
877889
public function findContentsByUids(array $uids)
    {
        $result = array();
        try {
            if (0 < count($uids)) {
                // Getting classnames for provided uids
                $classnames = $this->getDistinctClassnamesFromUids($uids);

                // Construct the DQL query
                $query = $this->createQueryBuilder('c');
                foreach (array_unique($classnames) as $classname) {
                    $query = $query->orWhere('c INSTANCE OF '.$classname);
                }
                $query = $query->andWhere('c._uid IN (:uids)')
                        ->setParameter('uids', $uids);

                $result = $query->getQuery()->execute();
            }
        } catch (\Exception $e) {
            // Ignoring error
        }

        return $result;
    }
528901
public function getGroups( $uid ) {
        static $groups = [];
        if ( isset($groups[$uid]) )
            return $groups[$uid];
        $user_groups = Db::table( $this->prefix.$this->_config['auth_group_access'] )
            ->alias('a')
            ->join( $this->prefix.$this->_config['auth_group']." g", "g.id=a.group_id" )
            ->where( "a.uid='$uid' and g.status='1'" )
            ->field( 'uid,group_id,title,rules' )->select();
        $groups[$uid] = $user_groups ? $user_groups : [];
        return $groups[$uid];
    }
191644
public function getUidInfo($uid)
    {
        $fd = $this->getFdFromUid($uid);
        if (empty($fd)) {
            if (!$this->isCluster()) {
                return [];
            } else {
                $fdInfo = ProcessManager::getInstance()->getRpcCall(ClusterProcess::class)->my_getUidInfo($uid);

                return $fdInfo;
            }
        } else {
            $fdInfo = $this->getFdInfo($fd);
            $fdInfo['node'] = getNodeName();

            return $fdInfo;
        }
    }
79407
public function getBody( $uid = '' )
	{
		$view = $this->getView();

		$html = '';
		foreach( $this->getSubClients() as $subclient ) {
			$html .= $subclient->setView( $view )->getBody( $uid );
		}

		return $html;
	}
1344117
protected function getUserInfo($uid) {
        static $userinfo=array();
        if(!isset($userinfo[$uid])){
             $userinfo[$uid]=M()->where(array('uid'=>$uid))->table($this->_config['AUTH_USER'])->find();
        }
        return $userinfo[$uid];
    }
477134
public function createNewRecords(int $pageId, array $tableRecordData): array
    {
        $dataMap = [];
        $newTableIds = [];
        $currentUid = null;
        $previousTableName = null;
        $previousUid = null;
        foreach ($tableRecordData as $tableName => $recordData) {
            $recordData = $this->resolvePreviousUid($recordData, $currentUid);
            if (!isset($recordData['pid'])) {
                $recordData['pid'] = $pageId;
            }
            $currentUid = StringUtility::getUniqueId('NEW');
            $newTableIds[$tableName][] = $currentUid;
            $dataMap[$tableName][$currentUid] = $recordData;
            if ($previousTableName !== null && $previousUid !== null) {
                $dataMap[$previousTableName][$previousUid] = $this->resolveNextUid(
                    $dataMap[$previousTableName][$previousUid],
                    $currentUid
                );
            }
            $previousTableName = $tableName;
            $previousUid = $currentUid;
        }
        $this->createDataHandler();
        $this->dataHandler->start($dataMap, []);
        $this->dataHandler->process_datamap();

        foreach ($newTableIds as $tableName => &$ids) {
            foreach ($ids as &$id) {
                if (!empty($this->dataHandler->substNEWwithIDs[$id])) {
                    $id = $this->dataHandler->substNEWwithIDs[$id];
                }
            }
        }

        return $newTableIds;
    }
749846
protected function _loadUids($mailbox, $uids, $uidvalid = null)
    {
        if (!isset($this->_data[$mailbox])) {
            $this->_data[$mailbox] = array();
        }

        $this->_loadMailbox($mailbox, $uidvalid);

        if (empty($uids)) {
            return;
        }

        $ptr = &$this->_data[$mailbox];

        $load = array_flip(
            array_diff_key(
                $this->_getMsgCids(
                    $mailbox,
                    array_unique(array_intersect($this->_mbox[$mailbox]['u']->ids, $uids))
                ),
                $this->_data[$mailbox]
            )
        );

        foreach (array_filter($this->_hash->get(array_keys($load))) as $key => $val) {
            $ptr[$load[$key]] = $val;
        }
    }
813685
protected function getRelatedRecords($foreignTable, int ...$uids): array
    {
        /** @var QueryBuilder $queryBuilder */
        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($foreignTable);
        $queryBuilder->select('*')
            ->from($foreignTable)
            ->where($queryBuilder->expr()->in('uid', $uids));
        if (isset($this->configuration['additionalWhereClause'])) {
            $queryBuilder->andWhere($this->configuration['additionalWhereClause']);
        }
        $statement = $queryBuilder->execute();

        return $this->sortByKeyInIN($statement, 'uid', ...$uids);
    }
421105
protected function _buildInsert()
        {
            $query[] = "INSERT INTO";
            $query[] = $this->_quoteIdentifier($this->_table_name);
            $field_list = array_map(array($this, '_quoteIdentifier'), array_keys($this->_dirty_fields));
            $query[] = "(" . join(", ", $field_list) . ")";
            $query[] = "VALUES";

            $placeholders = $this->_createPlaceholders($this->_dirty_fields);
            $query[] = "({$placeholders})";

            if (self::get_db($this->_connection_name)->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') {
                $query[] = 'RETURNING ' . $this->_quoteIdentifier($this->_getIdColumnName());
            }

            return join(" ", $query);
        }
757157
function follow_create_batch( $uids )
	{
		$params = array();
		if (is_array($uids) && !empty($uids)) {
			foreach($uids as $k => $v) {
				$this->id_format($uids[$k]);
			}
			$params['uids'] = join(',', $uids);
		} else {
			$params['uids'] = $uids;
		}
		return $this->oauth->post( 'friendships/create_batch', $params);
	}
920686
public static function getTagGroupByUid(string $uid): TagGroup
    {
        $query = TagGroup::find();
        $query->andWhere(['uid' => $uid]);
        return $query->one() ?? new TagGroup();
    }
120690
public function getRules($uid){
        
        $ruleIds = $this->getRuleIds($uid);
        
        $rules = DB::table($this->dbTablePrefix . $this->tableAuthRule)
                ->where('id' , 'in' , $ruleIds)
                ->where('status' , '1')
                ->order('sort asc')
                ->select();
        
        return $rules;
    }
1271041
public function getPidFromUid($uid = 0)
    {
        $queryBuilder = self::getQueryBuilder();
        $triggerElement = $queryBuilder
            ->select('pid')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->eq(
                    'uid',
                    $queryBuilder->createNamedParameter(abs($uid), \PDO::PARAM_INT)
                )
            )
            ->execute()
            ->fetch();
        $pid = (int)$triggerElement['pid'];
        return is_array($triggerElement) && $pid ? $pid : 0;
    }