Ghost/core/client/models/user.js
Gabor Javorszky f6d164b5d8 Current user added
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
2013-08-17 22:02:46 +01:00

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'
// });
}());