Is there a way to prevent one user from changing info in profile?

Discussion in 'Customization & add-ons' started by tomfra, Nov 30, 2008.

  1. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    I want to create one "DEMO" user that should have access to the member area but should not be able to change any info there - mainly not the info in the profile, should not be able to order products etc.

    If that's not possible, I want to completely disallow login for this user.

    Is there a way to do this without hacking the core code? Perhaps with some hooks?

    Thanks for any ideas!

    Tomas
  2. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Maybe disable the form if the demo user is logged in?
    untested: (havent used a != in smarty before)
    profile.html
    {if $smarty.session._amember_user.login != "demo"}
    <form name="signup" method="post" action="{$smarty.server.PHP_SELF|escape}">
    </if}

    David
  3. miso

    miso aMember Pro Customer

    Joined:
    Aug 22, 2006
    Messages:
    543
    "ne" works just fine (not equal), in case "!=" doesn't work...
  4. tomfra

    tomfra Member

    Joined:
    Dec 21, 2006
    Messages:
    199
    Thanks guys, it worked ;)

    Tomas

Share This Page