Skip to content

Commit 227def7

Browse files
committed
doc (handlers) add user.afterRegister example
1 parent ece08b5 commit 227def7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

examples/handlers/user.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/* global Backendless */
2+
3+
'use strict';
4+
5+
Backendless.enablePromises();
6+
Backendless.ServerCode.User.afterRegister((req, res) => {
7+
if (res.result) {
8+
return Backendless.UserService.assignRole(res.result.email, 'MyCustomRole');
9+
}
10+
});

0 commit comments

Comments
 (0)