Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorbadPussycat
     

    Can someone of the experienced Akelos--People look if I made any mistakes or if there are better ways to do it?

    http://wiki.akelos.org/user-authentication

    greetings from germany

    badPussycat

    • CommentAuthorKaste
     

    nice write-up. The overall structure is correct.

    1. You could add your login-view.
    2. Refactor the user->find()-stuff; create a method inside the user-model ->authenticate(:email,:password), then you have it all in one place. Later you probably store hashes instead of the plain password. Just let the method return the user or false.
    3. The time() is very restrictive
    4. You could use unset and isset instead of !empty.
    5. Add a error-message if login-credentials fail.

    regards (from germany) Kaste