Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    possible but needs custom coding on your part; you can use wp get_option(“lwa_data”); and then using php to serialize it to an array.

    Thread Starter Melusine29

    (@melusine29)

    Ok, with printr(get_option(“lwa_data”));

    I get :

    Array(
    	[logout_redirect] => https://www.my-site.com/
    	[role_login] => Array(
    		[lavandiere] => https://www.my-site.com/url-for-lavandiere/
    		[terre-ocean] => hhttps://www.my-site.com/url-for-terre-ocean/
    	)
    )

    But I would retrive only the “role_login”, one that matches my user …

    Eg, if my user is un group “lavandiere”, retrieve the url “https://www.my-site.com/url-for-lavandiere/”

    Thank’s

    Thread Starter Melusine29

    (@melusine29)

    ok, I have done differently. I got the role of the user like this:

    get_currentuserinfo();
    $role = $current_user->roles[0];
    $options = get_option("lwa_data");
    echo '<a class="voir-espace" href="'.$options['role_login'][$role].'">Voir votre espace</a>';

    and voila!
    Bye

    Plugin Support angelo_nwl

    (@angelo_nwl)

    thanks for sharing.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Retrieve the url redirection’ is closed to new replies.