mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
f6d164b5d8
Closes #340. Closes #375 * Replaced session with id of current user * Added method to ghostlocals to always send profile picture and full name to templates (template checks if falsy) * Modified user saving (`forge().set(new).save()` died on me, `forge().save(new)` didn't) * If user has profile picture, that will be used * If user has name, that will be used * Password changing doesn't care about your email. Uses cookies. Tasty! * User pane uses current user id. Had to set path to me, otherwise goes to `browse` instead of `read`. * Added logic to user api to check for `id === 'me'`, and then use the cookie value * User data saves are now correct * There is no logout error
14 lines
320 B
JavaScript
14 lines
320 B
JavaScript
/*global window, document, Ghost, $, _, Backbone */
|
|
(function () {
|
|
"use strict";
|
|
|
|
Ghost.Models.User = Backbone.Model.extend({
|
|
url: Ghost.settings.apiRoot + '/users/me'
|
|
});
|
|
|
|
// Ghost.Collections.Users = Backbone.Collection.extend({
|
|
// url: Ghost.settings.apiRoot + '/users'
|
|
// });
|
|
|
|
}());
|