Closed ritchieng closed 8 years ago
We could have password based accounts set the username at sign up, but oauth accounts can't do this. To have the same approach for all accounts, we could pop up an onboarding modal after sign up to capture the username. Same basic functionality that exists now, just automatically presented to the user after sign up. On Feb 22, 2016 6:28 PM, "ritchieng" notifications@github.com wrote:
Hi,
Currently users:
- Create Account
- Change Username when they log in.
However, may I know if users are able to key in their usernames during the sign-up process? Really appreciate the help on this because now by default it uses their email and the "update username" option after signing up is not intuitive.
Thanks!
— Reply to this email directly or view it on GitHub https://github.com/nate-strauser/wework/issues/86.
@nate-strauser Thanks for your recommendation. Any idea how do I go about to automatically present it to the user? Thanks, just starting out.
could do something like this
Tracker.autorun(function() {
var user = Users.findOne({
_id: Meteor.userId()
}, {
fields: {
"profile.name": 1
}
});
if (user && (!user.profile || !user.profile.name)) {
Modal.show('userProfile');
}
});
Thanks for your help. Which file should I be placing this?
probably /client/autorun.js
On Wed, Mar 2, 2016 at 6:15 PM, ritchieng notifications@github.com wrote:
Thanks for your help. Which file should I be placing this?
— Reply to this email directly or view it on GitHub https://github.com/nate-strauser/wework/issues/86#issuecomment-191488364 .
There's the following error.
I20160303-17:55:23.483(1)? Exception while invoking method 'ATCreateUserServer' { stack: 'ReferenceError: Modal is not defined\n at AccountsServer._onCreateUserHook (server/accounts.js:13:1)\n at AccountsServer.Ap.insertUserDoc (accounts_server.js:1230:21)\n at createUser (password_server.js:980:25)\n at AccountsServer.Accounts.createUser (password_server.js:1049:10)\n at [object Object].Meteor.methods.ATCreateUserServer (packages/useraccounts_core/lib/server_methods.js:103:1)\n at [object Object].methodMap.(anonymous function) (packages/meteorhacks_kadira/lib/hijack/wrap_session.js:164:1)\n at maybeAuditArgumentChecks (livedata_server.js:1698:12)\n at livedata_server.js:708:19\n at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)\n at livedata_server.js:706:40\n at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)\n at livedata_server.js:704:46\n at tryCallTwo (/Users/xx/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/xx/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:171:13)\n at new Promise (/Users/xx/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:65:3)\n at [object Object]._.extend.protocol_handlers.method (livedata_server.js:678:23)',
I20160303-17:55:23.483(1)? source: 'method' }
you can't open a client side modal from server code - onCreateUser is not the right spot for this
On Thu, Mar 3, 2016 at 11:58 AM, ritchieng notifications@github.com wrote:
There's the following error.
I20160303-17:55:23.483(1)? Exception while invoking method 'ATCreateUserServer' { stack: 'ReferenceError: Modal is not defined\n at AccountsServer._onCreateUserHook (server/accounts.js:13:1)\n at AccountsServer.Ap.insertUserDoc (accounts_server.js:1230:21)\n at createUser (password_server.js:980:25)\n at AccountsServer.Accounts.createUser (password_server.js:1049:10)\n at [object Object].Meteor.methods.ATCreateUserServer (packages/useraccounts_core/lib/server_methods.js:103:1)\n at [object Object].methodMap.(anonymous function) (packages/meteorhacks_kadira/lib/hijack/wrap_session.js:164:1)\n at maybeAuditArgumentChecks (livedata_server.js:1698:12)\n at livedataserver.js:708:19\n at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)\n at livedataserver.js:706:40\n at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)\n at livedata_server.js:704:46\n at tryCallTwo (/Users/xx/.meteor/ packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:45:5)\n at doResolve (/Users/xx/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:171:13)\n at new Promise (/Users/xx/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/nodemodules/promise/lib/core.js:65:3)\n at [object Object]..extend.protocol_handlers.method (livedata_server.js:678:23)', I20160303-17:55:23.483(1)? source: 'method' }
— Reply to this email directly or view it on GitHub https://github.com/nate-strauser/wework/issues/86#issuecomment-191858889 .
Thanks for guiding me through so far.
I don't get that "onCreateUser" is not the right spot. I placed it in /client/autorun.js. Does it have to do with adding something to accounts.js?
the error is saying that you are trying to load a modal from server/accounts.js
On Thu, Mar 3, 2016 at 12:12 PM, ritchieng notifications@github.com wrote:
Thanks for guiding me through so far.
I don't get that "onCreateUser" is not the right spot. I placed it in /client/autorun.js. Does it have to do with adding something to accounts.js?
— Reply to this email directly or view it on GitHub https://github.com/nate-strauser/wework/issues/86#issuecomment-191865011 .
Ok! So this code would not work? It's not an issue of whether I placed it in both or client because I tried both.
i'm sorry but this is not a problem with the app as i've written it, its something custom you are trying to do with your own fork - so i'm closing this issue
that code i supplied will work to load a client side modal, i use it in other production apps - it can not run on the server - if that doesn't help you, you are on your own to resolve this
Hey @nate-strauser. I just wanted to tell you it works. Really thankful. I left a line of code in the server/accounts.js file that caused issues.
So if anyone wants a modal that pops up after they log in, this is an excellent code to be placed in client/autorun.js!
Great!
On Sun, Mar 6, 2016 at 7:41 AM, ritchieng notifications@github.com wrote:
Hey @nate-strauser https://github.com/nate-strauser. I just wanted to tell you it works. Really thankful. I left a line of code in the server/accounts.js file that caused issues.
So if anyone wants a modal that pops up after they log in, this is an excellent code to be placed in client/autorun.js!
— Reply to this email directly or view it on GitHub https://github.com/nate-strauser/wework/issues/86#issuecomment-192884306 .
Hi,
Currently users:
However, may I know if users are able to key in their usernames during the sign-up process? Really appreciate the help on this because now by default it uses their email and the "update username" option after signing up is not intuitive.
Thanks!