Blame view
server/admin/accounts.coffee
599 Bytes
7439c59f5
|
1 |
### |
5f6f6fbb0
|
2 3 |
Accounts Server side account creation and manipulation methods. |
7439c59f5
|
4 |
|
5f6f6fbb0
|
5 6 |
Configuration: - forbidClientAccountCreation: Disallow client side account creation. |
7439c59f5
|
7 |
|
5f6f6fbb0
|
8 9 |
Methods: - createUserAccount: Performs a server-side account creation using the Meteor Accounts Password package. |
7439c59f5
|
10 |
### |
7439c59f5
|
11 12 |
# Configuration: Accounts.config( |
5f6f6fbb0
|
13 |
forbidClientAccountCreation: true |
7439c59f5
|
14 15 16 17 |
) # Define Methods Meteor.methods( |
5f6f6fbb0
|
18 |
createUserAccount: (user)-> |
7439c59f5
|
19 |
|
5f6f6fbb0
|
20 21 22 |
# Check values against correct pattern. pattern = { email: String, password: String } check(user, pattern) |
7439c59f5
|
23 |
|
5f6f6fbb0
|
24 25 |
# Create the user. Accounts.createUser(user) |
7439c59f5
|
26 |
) |