We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9189d4 commit e303b6cCopy full SHA for e303b6c
server/actions/patterns/save.php
@@ -149,6 +149,14 @@ function savePattern($userProfile) {
149
$result->name = $name;
150
}
151
152
+ // If we have a new username, save it back to the profile
153
+ if ($userProfile->username != $author) {
154
+ $this->db->execute("UPDATE users SET username=? WHERE id=?", [
155
+ ["s", $author],
156
+ ["s", $userProfile->userId]
157
+ ]);
158
+ }
159
+
160
$json = (object)createPatternNode($result);
161
// If this item was previously cached, delete it (patterns/load) will re-cache if needed.
162
\core\Cache::DeleteItem(\core\Cache::PatternKey($patternId));
0 commit comments