0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/models/base
Katharina Irrgang ca7b5643d5 🎨 more clean code in User Model (#7572)
* 🎨  do not call generateSlug twice for User.setup

* 🎨  call generatePasswordHash onSaving only

- now we can add defaults to User Model
- it was not possible before because add User model did the following:
  1. validate password length
  2. hash password manually
  3. call ghostBookshelf.Model.add and THEN bookshelf defaults fn gets triggered
- call generatePasswordHash in onSaving hook for all use case
- add more tests to user model, juhu
2016-10-14 18:24:38 +01:00
..
index.js 🎨 more clean code in User Model (#7572) 2016-10-14 18:24:38 +01:00
listeners.js Error creation (#7477) 2016-10-06 13:27:35 +01:00
token.js 🎨 register events in base model (#7560) 2016-10-14 13:37:01 +01:00
utils.js deps: lodash@4.13.1 2016-06-11 13:13:55 -06:00