mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
add unique instance id
This commit is contained in:
parent
eed0450351
commit
dcf1eed816
1 changed files with 13 additions and 0 deletions
13
lib/util.php
13
lib/util.php
|
|
@ -330,4 +330,17 @@ class OC_Util {
|
|||
}
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* get an id unqiue for this instance
|
||||
* @return string
|
||||
*/
|
||||
public static function getInstanceId(){
|
||||
$id=OC_Config::getValue('instanceid',null);
|
||||
if(is_null($id)){
|
||||
$id=uniqid();
|
||||
OC_Config::setValue('instanceid',$id);
|
||||
}
|
||||
return $id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue