You are here

public static function ExportUser::getFileTemporaryPath in Open Social 8.3

Same name and namespace in other branches
  1. 8 modules/social_features/social_user_export/src/ExportUser.php \Drupal\social_user_export\ExportUser::getFileTemporaryPath()
  2. 8.2 modules/social_features/social_user_export/src/ExportUser.php \Drupal\social_user_export\ExportUser::getFileTemporaryPath()
  3. 8.4 modules/social_features/social_user_export/src/ExportUser.php \Drupal\social_user_export\ExportUser::getFileTemporaryPath()

Returns unique file path.

Return value

string The path to the file.

1 call to ExportUser::getFileTemporaryPath()
ExportUser::exportUserOperation in modules/social_features/social_user_export/src/ExportUser.php
Callback of one operation.

File

modules/social_features/social_user_export/src/ExportUser.php, line 160

Class

ExportUser
Class ExportUser.

Namespace

Drupal\social_user_export

Code

public static function getFileTemporaryPath() {
  $hash = md5(microtime(TRUE));
  $filename = 'export-users-' . substr($hash, 20, 12) . '.csv';
  $file_path = file_directory_temp() . '/' . $filename;
  return $file_path;
}