carpentier.o52569
carpentier.o52569

Hi,

For the moment, the website in under development in a local folder. I create a 'test' user in the backend with a password and an e-mail address. The 'test' user is then activated.

I add the component 'account' in my login page.

signin.htm appears => OK.

After login, the page is update with the following element :

{% partial __SELF__ ~ '::activation_check' %}
{% partial __SELF__ ~ '::update' %}
{% partial __SELF__ ~ '::deactivate_link' %}

So I understand that my 'test' user is not login, right ? How is it possible ?

Another question : If I read at htm code (activation_check, update, register), after a successful login, no "logout" button seems to be appear on page.

If I read the User Plugin documention I found this :

<a data-request="onLogout" data-request-data="redirect: '/good-bye'">Sign out</a> ( => This is just text, no ?)

I really don't know where to place this line. This line was placed in my login page or added in an htm page of User Plugin (desactivate_link.htm e.g) and sent me an error message (Ajax manager can't be found with onLogOut)

Any idea ?

Thanks, Olivier

Last updated

daftspunk
daftspunk

So I understand that my 'test' user is not login, right ? How is it possible ?

This content is displayed when the user is logged in

<a data-request="onLogout" data-request-data="redirect: '/good-bye'">Sign out</a>

You are correct, this will give you a log out button, the best place for this is on the layout somewhere. Make sure you have the [session] component added to your layout so the onLogout handler is available everywhere.

carpentier.o52569
carpentier.o52569

Hi,

thank you for the answer.

I've added the two lines in the default layout :

<section id="page' class="container m-b-3"> <div><br><br></div> {% page %} {% component 'session' %} <a data-request="onLogout" data-request-data="redirect: '/good-bye'">Sign Out </a> <div><br><br></div> {% If this.page.filename != 'login.thm' %} {% partial 'footer' %} {% else %} <br><br> {% endif %} </section>

But I've just the text "sign out" and not the button that appear after user login. When I click on the text "sign out" I've an error message (Ajax onLogOut not found)

When I check users with the backend, It shows me that the user is registered but not connected...

I don't know what to do now...

Here is another method than "signin" to connect a user to check where is the problem ?

Thanks, Olivier

PS : I don't know why but the code part doesn't take into account the carriage return...

Last updated

daftspunk
daftspunk

It sounds like there could be multiple potential issues. The best advice I can give would be to look at the Vanilla theme

https://octobercms.com/theme/rainlab-vanilla

The default layout has a link for logging out the user and it works

carpentier.o52569
carpentier.o52569

Yeah, thank you !

I add the session component (I forgot to slide the component element on the layout... :( ...noob...), I copy/paste some code elements of Vanhilla (logout link of defaut.htm) to my custom theme and it works.

Have a nice week ! Olivier

1-5 of 5