Skip to content

Commit 1d5cf38

Browse files
committed
Added AV.Cloud.onLogin doc
1 parent 3ebbf60 commit 1d5cf38

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/cloud.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,19 @@
194194
*/
195195
AV.Cloud.afterDelete = function(name, func){};
196196

197+
/**
198+
* Registers a on-login function.
199+
* <br/><strong>Available in Cloud Code only</strong>.
200+
* If you want to use onLogin for an user in the AV JavaScript SDK, you should pass the function:
201+
* <code><pre>
202+
AV.Cloud.onLogin(function(request, response) {
203+
// code here
204+
});
205+
* </pre></code>
206+
* @param {Function} func The function to run before an user signin. This function should take two parameters a AV.Cloud.FunctionRequest and a AV.Cloud.FunctionResponse.
207+
*/
208+
AV.Cloud.onLogin = function(func) {};
209+
197210
/**
198211
* Makes an HTTP Request.
199212
* <br/><strong>Available in Cloud Code only</strong>.

0 commit comments

Comments
 (0)