|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
import { Meteor } from 'meteor/meteor'; |
|
|
|
|
import { check } from 'meteor/check'; |
|
|
|
|
import { Accounts } from 'meteor/accounts-base'; |
|
|
|
|
import { SHA256 } from 'meteor/sha'; |
|
|
|
|
import s from 'underscore.string'; |
|
|
|
|
|
|
|
|
|
import { settings } from '../../../settings'; |
|
|
|
|
@ -34,7 +35,7 @@ Meteor.methods({ |
|
|
|
|
if (result.error) { |
|
|
|
|
throw new Meteor.Error('error-invalid-password', 'Invalid password', { method: 'deleteUserOwnAccount' }); |
|
|
|
|
} |
|
|
|
|
} else if (user.username !== s.trim(password)) { |
|
|
|
|
} else if (SHA256(user.username) !== s.trim(password)) { |
|
|
|
|
throw new Meteor.Error('error-invalid-username', 'Invalid username', { method: 'deleteUserOwnAccount' }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|