• Resolved Rubberduckie

    (@rubberduckie)


    Hello, i would like to get some Condition depending on a CUEF Value.
    I got this value with:
    <?php $user = wp_get_current_user(); ?>
    <?php $value = get_cimyFieldValue($user->id, “sv_account” ); ?>
    <?php $value = esc_attr($value); ?>

    Now my condition shall be:
    <?php if ($value == “Premium” )
    {
    then …
    };
    ?>

    But this didn′t work.
    Hope you can help me.

    Best regards,
    Markus

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Rubberduckie

    (@rubberduckie)

    Tried it also with just:
    <?php $user = wp_get_current_user(); ?>
    <?php $value = get_cimyFieldValue($user->id, “sv_account” ); ?>

    If i use:
    <td><?php echo $value ?> </td>

    The right value is displayed.

    Just for your information. There are three different values possible. Free, Basic and Premium.

    Regards,
    Markus

    Thread Starter Rubberduckie

    (@rubberduckie)

    With this syntax it works:

    <?php $user_ID = get_current_user_id(); ?>
    <?php $value = get_cimyFieldValue($user_ID, “sv_account” ); ?>
    <?php $value = trim($value);?>
    <?php if ($value == “Premium”): ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cimy User Extra Fields and If Condition’ is closed to new replies.