Problems, need help? Have a tip or advice? Post it here.
7 posts Page 1 of 1
Logging out BUG.


when visiting the profile section, you have supplied a logout link. Now when you click logout it redirects back to the login page. Now if i type in the profile URL link in my browser it will open with them as logged in but i logged out?

In simple terms. It wont log out the user as i want it to using the profile page.
Hi Simon,

The default behaviour of cms:member_logout_link tag is to redirect back to the page the link is used from.

So, suppose a member is logged-in and is on the profile page.
Clicking the logout link will log her out and then redirect back to the original page i.e. profile page.
But now since the member is not logged-in, she is shown the login box.

If you are not happy with this default redirection, please use the 'redirect' parameter with the cms:member_logout_link tag to specify whatever page you want the user to land on after getting logged-out - e.g. the following will send her to the site's home page -
Code: Select all
<a href="<cms:member_logout_link redirect=k_site_link />">logout</a> 

Does this help?
Please let us know.

Thanks.
KK wrote: Hi Simon,

The default behaviour of cms:member_logout_link tag is to redirect back to the page the link is used from.

So, suppose a member is logged-in and is on the profile page.
Clicking the logout link will log her out and then redirect back to the original page i.e. profile page.
But now since the member is not logged-in, she is shown the login box.

If you are not happy with this default redirection, please use the 'redirect' parameter with the cms:member_logout_link tag to specify whatever page you want the user to land on after getting logged-out - e.g. the following will send her to the site's home page -
Code: Select all
<a href="<cms:member_logout_link redirect=k_site_link />">logout</a> 

Does this help?
Please let us know.

Thanks.



Hi KK,

The issue i'm having is it wont log the member out at all. it redirects back to the login page fine, which is what i'm wanting. Now if the member then goes onto the profile page without logging in they can still see the profile page rather than it asking to re-login

Also when adding a new field to be submitted with the register.php it wont automatically add onto the CMS Panel.

For example. I've added a new editable within the index page called company name. normal way, and added it into the <cms:member_define_fields />

Code in members/ index.php
Code: Select all
<cms:editable name='company_name'  type='text' />


Then within the register page.
Code: Select all
 <label>  Company Name (Enter if your a company)</label><br>
                            <cms:input  name='company_name' type='text' />


However when i look on the new submitted members profile via couch its blank when it should read what they put within the registration.
The issue i'm having is it wont log the member out at all

This is not the expected behavior so let us tackle this issue first (will come to the registration form later).

Is your site online? Can you PM me access creds to it so I can see the problem first-hand?
If not, please zip all related templates/snippets and PM me those. Perhaps something is wrong with the code.

Thanks
Thanks for the creds, Simon.

I had a look and the problem is with your code on the template.

As stated in the docs, the 'login' template handles the 'logout' action too.
In your template you have not implemented this at all (there is no cms:member_process_logout tag to be seen).

I suggest you please start with the sample template that comes with the module to see how it works and then make amends to it to suit you.

Hope this helps.
KK wrote: Thanks for the creds, Simon.

I had a look and the problem is with your code on the template.

As stated in the docs, the 'login' template handles the 'logout' action too.
In your template you have not implemented this at all (there is no cms:member_process_logout tag to be seen).

I suggest you please start with the sample template that comes with the module to see how it works and then make amends to it to suit you.

Hope this helps.


Hi KK,

Thanks for the response. I will take a look at this code now, i used your sample template as a starting point and left ''most of the code'' alone to ensure this worked correctly. I will take a look now and correct it.

Regarding the other question. When i ask the new register to fill in details, i've added a new section within this, company name. Now i've added this to the index page and its showing in the members section within the cpanel fine. However when they register it is not adding it.
However when they register it is not adding it.

It is mentioned in the docs, Simon, and I quote from it -
b. This tag works much like a databound-from (please see http://www.couchcms.com/docs/concepts/d ... forms.html) so it can accept explicit field_names as parameters.
So, for example, if the registration form has an input field named 'dob' that is to persisted in an editable region named 'dob' of the index template, the code would become
Code:
<cms:member_process_registration_form
dob=frm_dob
/>

To handle your specific case, since your editable region is named 'company_name' and the value of the cms:input would be available as 'frm_company_name', the following should persist the submitted value -
Code: Select all
<cms:member_process_registration_form 
    company_name=frm_company_name
/>

Hope this helps.
7 posts Page 1 of 1
cron