<?php
+
+use Friendica\Core\System;
+
/**
* Super-skeletal class to interact with Diaspora.
*
$this->setPassword($password);
}
- $this->cookiejar = tempnam(get_temppath(), 'cookies');
+ $this->cookiejar = tempnam(System::getTempPath(), 'cookies');
return $this;
}
public function setDiasporaID($id) {
$parts = explode('@', $id);
$this->user = $parts[0];
- $this->host = $parts[1];
+ if (count($parts) > 1) {
+ $this->host = $parts[1];
+ } else {
+ $this->host = '';
+ }
}
public function getDiasporaID() {