Use UID for cache key.
This commit is contained in:
parent
86ddf386d9
commit
20aee83d07
|
@ -44,7 +44,7 @@ if( is_null($contact)) {
|
||||||
$image->loadFromBase64($contact->getAsString('LOGO'));
|
$image->loadFromBase64($contact->getAsString('LOGO'));
|
||||||
}
|
}
|
||||||
if($image->valid()) {
|
if($image->valid()) {
|
||||||
$tmpkey = 'contact-photo-'.md5($contact->getAsString('FN'));
|
$tmpkey = 'contact-photo-'.$contact->getAsString('UID');
|
||||||
if(OC_Cache::set($tmpkey, $image->data(), 600)) {
|
if(OC_Cache::set($tmpkey, $image->data(), 600)) {
|
||||||
OCP\JSON::success(array('data' => array('id'=>$_GET['id'], 'tmp'=>$tmpkey)));
|
OCP\JSON::success(array('data' => array('id'=>$_GET['id'], 'tmp'=>$tmpkey)));
|
||||||
exit();
|
exit();
|
||||||
|
|
Loading…
Reference in New Issue