cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2680
Views
1
Helpful
14
Replies

Mail guest credentials to "Person being visited"

jordyjoossens
Level 1
Level 1

Hi everyone,

does anyone know if it is possible to script the following?

We are using a guest portal with sponsor approval.

There is a group with approvers defined.

When the guest user is registering her/his account, the field "Person being visited" is mandatory and needs an e-mail address of that person.

After completion, the sponsors approve the account and needs to give the credentials to the guest.

They will be mailed to that person as well, but when an US visitor comes to an EU site, this isn't always possible due to high roaming costs.

Therefore we want that the sponsor can see the credentials after approval (basic) and that when the account is approved or registered the credentials are also mailed to the "person being visited". So when that person meets up with the "Person being visited", he/she can hand over the credentials.

Is this possible in some way?

1 Accepted Solution

Accepted Solutions

Serhii Pustovit
Cisco Employee
Cisco Employee

Hi Jordy,

Could you try this script for "Self-registration page":

<script>

var textForCheckbox = 'Use my e-mail';

var check = $('<div class="ui-checkbox">'

+ '<input data-mini="true" type="checkbox" value="true" class="custom">'

+ '<label for="mail" data-corners="true" data-shadow="false" data-iconshadow="true" data-wrapperels="span" data-icon="checkbox-off" data-theme="a" data-mini="true" class="ui-checkbox-off ui-btn ui-btn-corner-all ui-mini ui-btn-icon-left ui-btn-up-a">'

+ '<span class="ui-btn-inner">'

+ '<span class="ui-btn-text">' + textForCheckbox +'</span>'

+ '<span class="ui-icon ui-icon-checkbox-off ui-icon-shadow"> </span>'

+ '</span></label></div>')

$('[data-role="fieldcontain"]:last-child').after(check);

  $('.ui-checkbox').on('click', function() {

    if($('.ui-icon-checkbox-off').length == 1) {

      $('[data-role="fieldcontain"]:nth-child(7)').hide();

      $('[for="mail"] .ui-icon').removeClass('ui-icon-checkbox-off');

      $('[for="mail"] .ui-icon').addClass('ui-icon-checkbox-on');

    } else if ($('.ui-icon-checkbox-on').length == 1){

      $('[data-role="fieldcontain"]:nth-child(7)').show();

      $('[for="mail"] .ui-icon').removeClass('ui-icon-checkbox-on');

      $('[for="mail"] .ui-icon').addClass('ui-icon-checkbox-off');

    } else console.log('test');

})

$('#ui_self_reg_submit_button').on('click', function(){

  if($('.ui-icon-checkbox-on').length == 1) {

    var mail = $('[name="guestUser.fieldValues.ui_email_address"]').val();

    $('[name="guestUser.fieldValues.ui_person_visited"]').val(mail);

  }

});

</script>

Thanks.

View solution in original post

14 Replies 14

Jason Kunst
Cisco Employee
Cisco Employee

The only way this is possible is if you always send the email to the sponsor by replacing the visitors email with the sponsor email by copying person being visited to the guest email field

Perhaps there might be a way to script a checkbox on the page that says you want your sponsor to get the email instead of yourself as you cannot receive email?

Would suggest following options as well:

doing sponsored accounts

Or texting the user with the credentials instead of using email

Or having person being visited access the account info in the sponsor portal

Hi Jason,

thanks again for the fast responds.

For texting we would need a separate box for sending texts. And we are running guest portals over many different countries. So this option would take a lot of extra budget.

The users shouldn't be allowed in the sponsor portal.

It would be a great option to change the person being visited parameter with the guest email field.

Is this scriptable?

Please let me know which option are you looking for? Ability to make the sponsor email be the visitors email? Please keep in mind only the sponsor will get the email and this will be done all the time on that portal

Or do you want a checkbox that allows the guest to override and to send the email to the sponsor instead of themselves? (Will see if this can be done)

Texting worldwide can be done economically

Check out http://cs.co/ise-community

Guest & web auth section

There is a list of sms providers that customers have used

The most ideal solution would be that it was possible to script something that the mail with the credentials is sent to the user AND the person being visited.

If that isn't possible, we would like to send the credential mail to the "Person being visited" mail address.

Thanks,

Jordy

I agree that would be the best solution however it’s not possible right now please reach out to your sales channel to request this feature

For now we can make it so that the person being visited can get the credentials but you didn’t answer my question would you like to see if it’s possible to have a checkbox on the page that allows the guest to choose where the credentials are sent? Either to the guest or to the sponsor please let me know

Hi Jason,

I will do that.

Yes the checkbox solution would be an agreeable solution for this time.

Is this possible at this time?

yes i think possible, it might be a few days

Thanks a lot Jason!

Serhii Pustovit
Cisco Employee
Cisco Employee

Hi Jordy,

Could you try this script for "Self-registration page":

<script>

var textForCheckbox = 'Use my e-mail';

var check = $('<div class="ui-checkbox">'

+ '<input data-mini="true" type="checkbox" value="true" class="custom">'

+ '<label for="mail" data-corners="true" data-shadow="false" data-iconshadow="true" data-wrapperels="span" data-icon="checkbox-off" data-theme="a" data-mini="true" class="ui-checkbox-off ui-btn ui-btn-corner-all ui-mini ui-btn-icon-left ui-btn-up-a">'

+ '<span class="ui-btn-inner">'

+ '<span class="ui-btn-text">' + textForCheckbox +'</span>'

+ '<span class="ui-icon ui-icon-checkbox-off ui-icon-shadow"> </span>'

+ '</span></label></div>')

$('[data-role="fieldcontain"]:last-child').after(check);

  $('.ui-checkbox').on('click', function() {

    if($('.ui-icon-checkbox-off').length == 1) {

      $('[data-role="fieldcontain"]:nth-child(7)').hide();

      $('[for="mail"] .ui-icon').removeClass('ui-icon-checkbox-off');

      $('[for="mail"] .ui-icon').addClass('ui-icon-checkbox-on');

    } else if ($('.ui-icon-checkbox-on').length == 1){

      $('[data-role="fieldcontain"]:nth-child(7)').show();

      $('[for="mail"] .ui-icon').removeClass('ui-icon-checkbox-on');

      $('[for="mail"] .ui-icon').addClass('ui-icon-checkbox-off');

    } else console.log('test');

})

$('#ui_self_reg_submit_button').on('click', function(){

  if($('.ui-icon-checkbox-on').length == 1) {

    var mail = $('[name="guestUser.fieldValues.ui_email_address"]').val();

    $('[name="guestUser.fieldValues.ui_person_visited"]').val(mail);

  }

});

</script>

Thanks.

Hi Serhii,

thanks a lot, this works for us!

Kind regards,

Jordy

Hi Serhii,


This script would help me also a lot.

But for some reason its not working on ISE 2.3 no patch.


Do I need to put it under Guest portal/Registration form/Optional Content 2  ?

It looks like this:


Capture.JPG


I cannot click the top layer "Use My e-mail", but can click the check box under it. Makes no diffrence.

Sposor receives the email, approves it and guest gets the credentilas by email.


Please let me know what do you think?


Thank you,

laszlo



An update to my previous post.

The UI still looks the same but the functionality of the button is working somehow now, but not as expected.

If checkbox is not clicked then we have the normal single click approval behavior.

Sponsor receives the email, approves it and guest gets the credentials by email.

If checkbox is clicked then the guest receives both approval email and then credential email! Which is not good.

The sponsor should receive bot emails. That was the scope of the script, no?

If I change the submit function to:

$('#ui_self_reg_submit_button').on('click', function(){

  if($('.ui-icon-checkbox-on').length == 1) {

   var mail = $('[name="guestUser.fieldValues.ui_person_visited"]').val();

    $('[name="guestUser.fieldValues.ui_email_address"]').val(mail);

}

Then Sponsor receives bot approval email and credentials, which is the expected result.

But there is one problem. Because the email field is replaced by the sponsors email, the guest username will always be the sponsor email.

So I’m stuck, let me know if i missed something.

Thanks,

laszlo  

Hi Laszlo,

I'm not sure what's wrong with script in current state, because I reproduced it on ISE 2.2 and 2.3, it works as expected

I would add only one thing for this script to hide this small checkbox:

<script>

setTimeout(function(){

  $($('.ui-checkbox')[1]).hide();

}, 1000);

</script>

In your changes - you take e-mail from sponsor (Person being visited) and insert it into guest's mail, thats why it doesn't work as expected.

Basic script, by click on checkbox is hide 'Person being visited' input field and insert it in that hidden field guest's mail

Here are screenshotsbeforeClick.pngafterClick.png

I think you need to change default settings in ISE for your portal.

There is already a thread on the Community about this

You can’t have it both ways, ISE can either email the sponsor or email the guest it can’t do both

Sent from my iPhone

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: