Forum for discussing general topics related to Couch.
7 posts Page 1 of 1
Hello, I am thinking to use Couchcms for my website but there should be user registration available, that allows to only registered users to see certain page. It sends email for a successful registration. Does Couchcms has this option? As far as i understand there is no such function anymore. Is that true ot there is still some way to do that? Thank you in advance.
Hi,

'Extended Users' should help (https://www.couchcms.com/docs/extended- ... s/post.htm).
I must add here, though, that the feature is somewhat advanced to use if this is only your first site to implement using Couch.

Hope it helps.
Thank you,I hope it will work for me. I will check it out and try.
Hello again. I used the extended users and so far everything seems okay. Just a question, when a person logs in and browses around the site, somewhere to stay the sign "logged in as (username)"/ logout, how to do that? Because when I log in, instead of that I still see the buttons for sign in and registration. It is something similar to the comments section. There it says "you are logged in as (username)"/ logout, for example. Thank you in advance.

Edit: I didt it like this:
Code: Select all
<!-- Login -->
          <cms:if k_logged_out >
          <div class="login">
          <a href="users/login.php"><i class="fa fa-user" aria-hidden="true"></i> <span>Login</span></a>
          </div>
        <!-- Register -->
         <div class="register">
        <a href="users/register.php"><i class="fa fa-user" aria-hidden="true"></i> <span>Register</span></a>
           </div>
        <cms:else />
           <p>
   Logged in as <b><cms:show k_user_title /></b>.
   <a href="<cms:show k_logout_link />" onclick="if( confirm('Are you sure you want to logout?') ) { return true; } return false;">Logout &raquo;</a>
    </p>
         </cms:if>
Hello again, I have another problem: I try to make a clonable page to be accessed only from Authenticated User. This in my site is the events section, from the admin panel is possible from the Advanced settings but only for a single post. I would like to make the whole page with all the events visible only from the Authenticated User. Is it possible? When I insert this code nothing happens :
Code: Select all
<cms:template title='News' clonable='1' access_level='2'>
    <!-- Editable regions and Folders are usually defined here -->
</cms:template>
Hi,

I trust you are using 'extended users'; if so, the technique is shown in its docs (https://www.couchcms.com/docs/extended- ... s/post.htm). Please put the following somewhere at the top of your template (but below the opening PHP statement, of course) -
Code: Select all
<!-- this is secured page. login first to access it -->
<cms:if k_logged_out >
    <cms:redirect "<cms:login_link />" />
</cms:if>

<!-- someone who manages to reach here is certainly a logged-in user -->
..

Some more info can be found at https://docs.couchcms.com/concepts/users.html

Finally, a useful way for finding the right variables that can be used in a situation is to place a <cms:dump /> or <cms:dump_all /> tag at that point in the template - you'll get to see a whole list and chances are you'll recognize the variable that would help.

Hope this helps.
Yes it works perfect, thank you very much for the help, and I will use the last advice in the future.
7 posts Page 1 of 1
cron