- return XDB::execute('REPLACE INTO profile_medals_sub VALUES({?}, {?}, {?})', $this->uid, $this->mid, $this->gid);
+ return XDB::execute('REPLACE INTO profile_medals
+ VALUES ({?}, {?}, {?})',
+ $this->user->profile()->id(), $this->mid,
+ is_null($this->gid) ? 0 : $this->gid);