oc-shopaholic / oc-buddies-plugin

👥 October CMS user system
https://octobercms.com/plugin/lovata-buddies
GNU General Public License v3.0
31 stars 15 forks source link

login page #18

Closed ajmanco closed 6 years ago

ajmanco commented 6 years ago

Hi . I have made a page for users to log in according to the sample you put in the documet like this :

title = "Login"
url = "/signin/:code?"
layout = "inner"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"

[Login]
mode = "submit"
flash_on = 0
redirect_on = 1
redirect_page = "system/profile"

==

{% set arError = Login.getErrorMessage %}
{% set arForm = Login.getOldFormData %}

<form href="{{ 'login'|page }}">
    <label for="field-email">Login</label>
    <input type="email" id="field-email" placeholder="Email" name="email" value="{{ arForm.email }}">
    {% if arError.message is not empty and arError.field == 'email' %}
        <p>{{ arError.message }}</p>
    {% endif %}

    <label for="field-password">Password</label>
    <input type="password" id="field-password" name="password">

    <label for="field-remember_me">Remember me</label>
    <input type="checkbox" id="field-remember_me" name="remember_me">

    <button type="submit">Submit</button>
</form>
{% if arError.message is not empty %}
    <p>{{ arError.message }}</p>
{% endif %}

But when I write the username and password ( even mistake or even when I leave it blank ) it is not redirect to my destination page and no message is given. In any case , the message " You are already authorized. " appears.

nolyboms commented 5 years ago

Having the same issue. Can you please tell me what the issue was in your case?

kharanenka commented 5 years ago

Hi! You need to fill in "redirect_page" correctly It is not URL of page. It is page ID (name of page *.htm file). For example: redirect_page = "system_profile"