0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/client/initializers/current-user.js

14 lines
410 B
JavaScript
Raw Normal View History

import User from 'ghost/models/user';
export default {
name: 'currentUser',
initialize: function (container, application) {
var user = User.create(application.get('user') || {});
container.register('user:current', user, { instantiate: false });
container.injection('route', 'user', 'user:current');
container.injection('controller', 'user', 'user:current');
}
};