kopia lustrzana https://github.com/backface/turtlestitch
Checking if user is verified on session init
rodzic
9b2bf7ead7
commit
6cb9bcc761
1
cloud.js
1
cloud.js
|
@ -208,6 +208,7 @@ Cloud.prototype.checkCredentials = function (onSuccess, onError, response) {
|
||||||
function (user) {
|
function (user) {
|
||||||
if (user.username) {
|
if (user.username) {
|
||||||
myself.username = user.username;
|
myself.username = user.username;
|
||||||
|
myself.verified = user.verified;
|
||||||
}
|
}
|
||||||
if (onSuccess) {
|
if (onSuccess) {
|
||||||
onSuccess.call(
|
onSuccess.call(
|
||||||
|
|
25
gui.js
25
gui.js
|
@ -276,6 +276,22 @@ IDE_Morph.prototype.openIn = function (world) {
|
||||||
function (username) {
|
function (username) {
|
||||||
if (username) {
|
if (username) {
|
||||||
myself.source = 'cloud';
|
myself.source = 'cloud';
|
||||||
|
if (!SnapCloud.verified) {
|
||||||
|
new DialogBoxMorph().inform(
|
||||||
|
'Unverified account',
|
||||||
|
'Your account is still unverified.\n' +
|
||||||
|
'Please use the verification link that\n' +
|
||||||
|
'was sent to your email address when you\n' +
|
||||||
|
'signed up.\n\n' +
|
||||||
|
'If you cannot find that email, please\n' +
|
||||||
|
'check your spam folder. If you still\n' +
|
||||||
|
'cannot find it, please use the "Resend\n' +
|
||||||
|
'Verification Email..." option in the cloud\n' +
|
||||||
|
'menu.',
|
||||||
|
world,
|
||||||
|
myself.cloudIcon(null, new Color(0, 180, 0))
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -5161,11 +5177,16 @@ IDE_Morph.prototype.initializeCloud = function () {
|
||||||
if (!isNil(response.days_left)) {
|
if (!isNil(response.days_left)) {
|
||||||
new DialogBoxMorph().inform(
|
new DialogBoxMorph().inform(
|
||||||
'Unverified account: ' + response.days_left + ' days left',
|
'Unverified account: ' + response.days_left + ' days left',
|
||||||
'You are now logged in, but your account\n' +
|
'You are now logged in, and your account\n' +
|
||||||
'has not been verified yet.\n' +
|
'is enabled for three days.\n' +
|
||||||
'Please use the verification link that\n' +
|
'Please use the verification link that\n' +
|
||||||
'was sent to your email address when you\n' +
|
'was sent to your email address when you\n' +
|
||||||
'signed up.\n\n' +
|
'signed up.\n\n' +
|
||||||
|
'If you cannot find that email, please\n' +
|
||||||
|
'check your spam folder. If you still\n' +
|
||||||
|
'cannot find it, please use the "Resend\n' +
|
||||||
|
'Verification Email..." option in the cloud\n' +
|
||||||
|
'menu.\n\n' +
|
||||||
'You have ' + response.days_left + ' days left.',
|
'You have ' + response.days_left + ' days left.',
|
||||||
world,
|
world,
|
||||||
myself.cloudIcon(null, new Color(0, 180, 0))
|
myself.cloudIcon(null, new Color(0, 180, 0))
|
||||||
|
|
Ładowanie…
Reference in New Issue