Returns SNS account URLs

@param  int $user_id
@return array
425770
protected function _get_sns_accounts( $user_id ) {
		$sns_accounts     = $this->_sns_accounts();
		$sns_account_keys = array_keys( $sns_accounts );

		$sns_accounts = [];

		foreach ( $sns_account_keys as $sns_account_key ) {
			$sns_account = get_the_author_meta( $sns_account_key, $user_id );
			if ( ! $sns_account ) {
				continue;
			}
			$sns_accounts[ $sns_account_key ] = $sns_account;
		}

		return $sns_accounts;
	}
893937
public function retrieve_user_ids(string $id_option = null, string $id_user): ?array
  {
    return $this->_retrieve_ids($id_option, $id_user);
  }
404152
public function userGet(int $user_id)
    {
        $value = get_user_meta($user_id, $this->getName(), true);

        if (! empty($value)) {
            $this->setValue($value);
        }
    }
1056551
public function get_from_user_id_and_post_ids(int $userid, array $postids) {
        $alias = $this->get_table_alias();
        [$postidinsql, $params] = $this->get_db()->get_in_or_equal($postids);
        $params[] = $userid;

        $wheresql = "{$alias}.postid {$postidinsql}";
        $wheresql .= " AND {$alias}.userid = ?";
        $sql = $this->generate_get_records_sql($wheresql);
        $records = $this->get_db()->get_records_sql($sql, $params);

        return $this->transform_db_records_to_entities($records);
    }
834980
public function getSessionCheckUrl($user_id, $sso_session)  {
        $host = Maestrano::with($this->_preset)->param('sso.idp');
        $api_base = Maestrano::with($this->_preset)->param('api.base');
        $endpoint = 'auth/saml';

        return "${host}${api_base}${endpoint}/${user_id}?session=${sso_session}";
    }
277135
public static function isAuthentication($user_id)
    {
        $user = static::findOne(['user_id' => $user_id]);
        return $user ? $user->status == static::STATUS_AUTHENTICATED : false;
    }
269094
public function editUser($user_id)
    {

        $user = $this->getFullUser($user_id);

        // get all groups except the one containing admin as admin account is special account
        // and the one to which the current user is already attached.
        $groups = $this->getAllGroups()->filter(function ($group, $key) use ($user_id) {

            return $group->users->where('name', 'admin')->isEmpty() && $group->users->where('id', $user_id)->isEmpty();
        });

        $login_history = $user->login_history()->orderBy('created_at', 'desc')->take(15)
            ->get();

        return view('web::configuration.users.edit',
            compact('user', 'groups', 'login_history'));
    }
479145
public static function messageuser_link_params(int $useridto) : array {
        global $USER;

        return [
            'id' => 'message-user-button',
            'role' => 'button',
            'data-conversationid' => api::get_conversation_between_users([$USER->id, $useridto]),
            'data-userid' => $useridto,
        ];
    }
736395
public static function find_trusted_emails($user_id)
	{
		if (empty($user_id) || !is_numeric($user_id))
		{
			return false;
		}

		$results = self::all()
			->whereEquals('user_id', $user_id)
			->rows()
			->fieldsByKey('email');

		if (empty($results))
		{
			return false;
		}

		return $results;
	}
1282698
public function getUserCompnies($user_id,$status) {
        $criteria = new CDbCriteria;
        $criteria->join .= "INNER JOIN profiles p  ON p.person_id = ccuc_person_id AND ccuc_status='" . $status . "'";
        $criteria->condition = 'p.user_id = ' . $user_id;
        return CcucUserCompany::model()->findAll($criteria);
    }
15389
public function getPermissions($user_id = null)
    {
        static $permissions = array();

        if (!isset($user_id)) {
            $user_id = $this->uid;
        }

        if (isset($permissions[$user_id])) {
            return $permissions[$user_id];
        }

        $user = $this->get($user_id);

        if (empty($user['role_id'])) {
            return $permissions[$user_id] = array();
        }

        $role = array();
        if (isset($user['role_permissions'])) {
            $role['permissions'] = $user['role_permissions'];
        } else {
            $role = $this->role->get($user['role_id']);
        }

        if (empty($role['permissions'])) {
            return $permissions[$user_id] = array();
        }

        return $permissions[$user_id] = (array) $role['permissions'];
    }
285934
protected function _get_detail_page_url( $user_id ) {
		$detail_keys = $this->_add_detail_url_field();
		$detail_keys = array_keys( $detail_keys );
		foreach ( $detail_keys as $key ) {
			$detail_url = get_the_author_meta( $key, $user_id );
			if ( $detail_url ) {
				return $detail_url;
			}
		}
	}
465681
public function find($user_id): ?User
    {
        return app('cache.array')->rememberForever(__CLASS__ . $user_id, static function () use ($user_id): ?User {
            return DB::table('user')
                ->where('user_id', '=', $user_id)
                ->get()
                ->map(User::rowMapper())
                ->first();
        });
    }
520743
public function getUser($user_name)
    {
        $url          = $this->url.'users/'.$user_name;
        $option       = [];
        $access_token = $this->getToken();
        $header []    = 'Authorization: Bearer '.$access_token;

        return Http::postCurl($url, $option, $header, 'GET');
    }
649559
static function _get_user_by_id( $user_id ) {
            self::$_static_logger->entrance( "user_id = {$user_id}" );

            $users = self::get_all_users();

            if ( is_array( $users ) ) {
                if ( isset( $users[ $user_id ] ) &&
                     $users[ $user_id ] instanceof FS_User &&
                     $user_id == $users[ $user_id ]->id
                ) {
                    return $users[ $user_id ];
                }

                // If user wasn't found by the key, iterate over all the users collection.
                foreach ( $users as $user ) {
                    /**
                     * @var FS_User $user
                     */
                    if ( $user_id == $user->id ) {
                        return $user;
                    }
                }
            }

            return null;
        }
658685
private function get_user_licenses( $user_id ) {
            $all_licenses = self::get_all_licenses( $this->_module_id );
            if ( empty( $all_licenses ) ) {
                return array();
            }

            $user_license_ids = $this->get_user_linked_license_ids( $user_id );
            if ( empty( $user_license_ids ) ) {
                return array();
            }

            $licenses = array();
            foreach ( $all_licenses as $license ) {
                if ( in_array( $license->id, $user_license_ids ) ) {
                    $licenses[] = $license;
                }
            }

            return $licenses;
        }
521460
public function get_selected_users() {
        global $DB;
        $idlist = array();
        if (!empty($this->filters->userids)) {

            $idlist = explode(',', $this->filters->userids);
            list($where, $params) = $DB->get_in_or_equal($idlist);
            return $DB->get_records_select('user', "id $where", $params);

        }
        return $idlist;
    }