this.userId

Server this.userId Source Access inside the publish function. The id of the logged-in user, or null if no user is logged in.

meteor publish

meteor publish Publishes your package. To publish, you must cd into the package directory, log in with your Meteor Developer Account and run meteor publish. By convention, published package names must begin with the maintainer's Meteor Developer Account username and a colon, like so: iron:router. To publish a package for the first time, use meteor publish --create. Sometimes packages may contain binary code specific to an architecture (for example, they may use an npm package). In that case, ru

AccountsServer#validateLoginAttempt

Server accountsServer.validateLoginAttempt(func) Source Validate login attempts. Arguments func Function Called whenever a login is attempted (either successful or unsuccessful). A login can be aborted by returning a falsy value or throwing an exception.

api.use

package.js api.use(packageNames, [architecture], [options]) Depend on package packagename. Arguments packageNames String or Array of Strings Packages being depended on. Package names may be suffixed with an @version tag. In general, you must specify a package's version (e.g., 'accounts@1.0.0' to use version 1.0.0 or a higher compatible version (ex: 1.0.1, 1.5.0, etc.) of the accounts package). If you are sourcing core packages from a Meteor release with versionsFrom, you may leave off

Accounts.createUser

Anywhere Accounts.createUser(options, [callback]) import { Accounts } from 'meteor/accounts-base' Source Create a new user. Arguments callback Function Client only, optional callback. Called with no arguments on success, or with a single Error argument on failure. Options username String A unique name for this user. email String The user's email address. password String The user's password. This is not sent in plain text over the wire. profile Object The user's prof

Blaze.With

Client Blaze.With(data, contentFunc) import { Blaze } from 'meteor/blaze' Source Constructs a View that renders content with a data context. Arguments data Object or Function An object to use as the data context, or a function returning such an object. If a function is provided, it will be reactively re-run. contentFunc Function A Function that returns renderable content.

Accounts.verifyEmail

Client Accounts.verifyEmail(token, [callback]) import { Accounts } from 'meteor/accounts-base' Source Marks the user's email address as verified. Logs the user in afterwards. Arguments token String The token retrieved from the verification URL. callback Function Optional callback. Called with no arguments on success, or with a single Error argument on failure.

EJSON.fromJSONValue

Anywhere EJSON.fromJSONValue(val) import { EJSON } from 'meteor/ejson' Source Deserialize an EJSON value from its plain JSON representation. Arguments val JSON-compatible Object A value to deserialize into EJSON.

check

Anywhere check(value, pattern) import { check } from 'meteor/check' Source Check that a value matches a pattern. If the value does not match the pattern, throw a Match.Error. Particularly useful to assert that arguments to a function have the right types and structure. Arguments value Any The value to check pattern Match Pattern The pattern to match value against

Sort specifiers

Sort Specifiers Sorts may be specified using your choice of several syntaxes: // All of these do the same thing (sort in ascending order by // key "a", breaking ties in descending order of key "b") [["a", "asc"], ["b", "desc"]] ["a", ["b", "desc"]] {a: 1, b: -1} The last form will only work if your JavaScript implementation preserves the order of keys in objects. Most do, most of the time, but it's up to you to be sure. For local collections you can pass a comparator function which receives