• Resolved gpmonlineshop

    (@gpmonlineshop)


    I am trying to make this code to work for me. Not exactly the code but the idea is there.

    This code should open the iframe and login the current user of my website.
    If I replace the username with actual user name it works but I want it so that it will just pick up the current user that is logged in at the time.
    I hope I made sense

    <iframe src=”https://www.website.com/.asp?c=678&phpu={username}&phpp={userpassword}&phpe={$user_email}” width=”1024″ height=”768″></iframe>

Viewing 6 replies - 1 through 6 (of 6 total)
  • Same domain or different?
    Are cookies involved?

    Thread Starter gpmonlineshop

    (@gpmonlineshop)

    Different domains.

    User register on my website https://www.mywebsite.com and when a user fire up that iframe it should open that iframe https://www.website.com and automatically register that user in that website or login that user if that user already exist.

    Not sure if it will make it easier if we involved cookies.

    Sorry I’m just a beginner at this.

    Thanks for the quick response too

    Easier, no, more secure

    In regards to getting your current users information, you would want to get the current logged in user via wp_get_current_user()

    Thread Starter gpmonlineshop

    (@gpmonlineshop)

    not working out for me

    out of my league I guess

    Trying to put this in a wordpress page but i guess i can’t run php inside a page.

    <iframe src=”https://www.gpmonlineshop.com/lobby/lobby.asp?c=customerid&phpu=&#8217; . $current_user->user_login . ‘&phpp=’ . $current_user->$user_pass_md5 . ‘&phpe=’ . $current_user->user_email . ‘” width=”1024″ height=”768″></iframe>

    Oh well I guess we just have to settle with double registration

    Can you wrap your code in the back ticks please, easier to read

    Is that your entire block?
    It looks like your in a PHP block mid echo()

    If not, you not breaking in and out of PHP, for example

    <?php
    $current_user = wp_get_current_user();
    echo('<iframe src="https://www.gpmonlineshop.com/lobby/lobby.asp?c=customerid&phpu=' . $current_user->user_login . '&phpp=' . $current_user->user_pass_md5 . '&phpe=' . $current_user->user_email . '" width="1024" height="768"></iframe>');
    ?>

    Thread Starter gpmonlineshop

    (@gpmonlineshop)

    I managed to solved this by using the get_userinfo

    ‘<?php
    /*
    Template Name: xxxxxxxx
    */
    ?>
    <?php if ( is_user_logged_in() ) { ?>
    <?php global $current_user; get_currentuserinfo(); ?>
    <?php } else { ?>
    <?php wp_redirect(‘https://xxxxxxxxx.com/&#8217;); ?>
    <?php } ?>’

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Help with the iframe code’ is closed to new replies.