- if ($this->changed['cv']) {
- XDB::execute("UPDATE profiles
- SET cv = {?}
- WHERE pid = {?}",
- $this->values['cv'], $this->pid());
+ if (S::user()->checkPerms(User::PERM_DIRECTORY_PRIVATE)) {
+ if ($this->changed['cv']) {
+ XDB::execute("UPDATE profiles
+ SET cv = {?}
+ WHERE pid = {?}",
+ $this->values['cv'], $this->pid());
+ }