From bdd24f1b38bc8a49098c508742c60d5a8c0ad496 Mon Sep 17 00:00:00 2001 From: REIS Benjamin Date: Wed, 12 Oct 2016 08:39:38 +0200 Subject: [PATCH] Allow re-creation of account only if the username is the phone number --- Classes/AssistantView.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Classes/AssistantView.m b/Classes/AssistantView.m index 6136b3c24..355500fac 100644 --- a/Classes/AssistantView.m +++ b/Classes/AssistantView.m @@ -861,10 +861,15 @@ void assistant_is_account_activated(LinphoneAccountCreator *creator, LinphoneAcc [thiz findButton:ViewElement_NextButton].enabled = NO; } else if (status == LinphoneAccountCreatorAccountNotActivated) { if (!IPAD || linphone_account_creator_get_phone_number(creator) != NULL) { - //Re send SMS - linphone_account_creator_recover_phone_account(creator); + //Re send SMS if the username is the phone number + if (linphone_account_creator_get_username(creator) != linphone_account_creator_get_phone_number(creator) && linphone_account_creator_get_username(creator) != NULL) { + [thiz showErrorPopup:"ERROR_ACCOUNT_ALREADY_IN_USE"]; + [thiz findButton:ViewElement_NextButton].enabled = NO; + } else { + linphone_account_creator_recover_phone_account(creator); + } } else { - // TO DO : Re send email + // TO DO : Re send email ? [thiz showErrorPopup:"ERROR_ACCOUNT_ALREADY_IN_USE"]; [thiz findButton:ViewElement_NextButton].enabled = NO; }