+ $result = \OC_DB::executeAudited(
+ 'SELECT `note_tags` FROM `*PREFIX*grauphel_notes`'
+ . ' WHERE note_user = ?',
+ array($this->username)
+ );
+
+ $tags = array();
+ while ($row = $result->fetchRow()) {
+ $tags = array_merge($tags, json_decode($row['note_tags']));
+ }
+ return array_unique($tags);