/** * Outputs the current users full name (if any) */ protected function tagFullname() { $user = SessionHandler::user(); if ($user) { return $user->getFullName(); } }
public static function delete($projectId) { $projectDoc = self::get($projectId); $userId = SessionHandler::user()->getUserId(); if ($projectDoc->type == 'project' && in_array($projectDoc->users, $userId)) { CouchDB::client()->deleteDoc($projectDoc); return true; } return false; }