1
0
mirror of https://github.com/flarum/core.git synced 2025-06-22 10:51:40 +02:00

Allow locale to be selected in footer

This commit is contained in:
Toby Zerner
2015-08-05 09:50:57 +09:30
parent 48df9bb678
commit f49d0e5341
11 changed files with 87 additions and 18 deletions

@ -100,4 +100,18 @@ export default class User extends mixin(Model, {
};
image.src = this.avatarUrl();
}
/**
* Update the user's preferences.
*
* @param {Object} newPreferences
* @return {Promise}
*/
savePreferences(newPreferences) {
const preferences = this.preferences();
Object.assign(preferences, newPreferences);
return this.save({preferences});
}
}