ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Login Form Weirdness

January 26, 2011 10:19am

Subscribe [4]
  • #1 / Jan 26, 2011 10:19am

    Kevin Gerich

    213 posts

    Good Morning,

    I am looking at using the stock login form.
    ref : http://ellislab.com/expressionengine/user-guide/modules/member/login_form.html

    My glitch is with the

    <input class='checkbox' type='checkbox' name='anon' value='1' checked='checked' /> Show my name in the online users list checkbox

    When it is either checked or unchecked the value of “y” is entered into the exp_online_users table.

    The column is defined as CHAR(1)with no default value

    I’m working on a plugin that reads this value and displays some logged in user information based upon it.

    The element shows checked with a value of “1”, “y” is always entered into the column regardless of whether the box is checked or not.  (I tried changing the “1” to an “n” as well)

    How is this actually supposed to work?  Is this value used by EE in any way?

    Please advise.

    Many thanks,

    Jim

  • #2 / Jan 26, 2011 5:57pm

    Ingmar

    29245 posts

    What version and build of EE are you using? This setting is used to determine whether to show your name in the list of currently logged-in users, or not.

  • #3 / Jan 26, 2011 6:20pm

    Kevin Gerich

    213 posts

    Hi,

    v2.1.3 I was trying to write a plugin that respects that setting.

    But like I said, no matter what value I try to set “anon” to, it is always stored as “y” in the database.

    I tried logging in with some test user accounts as well.

    It seems to only process it if you are in a non-super admin group.

    I’ll play around with it a bit more.

    Its weird, if unchecked it defaults to “y” of checked it doesn’t store anything, though it says it should be a 1.

    Thanks,

    Jim

  • #4 / Jan 27, 2011 11:43am

    Sue Crocker

    26054 posts

    the field that is being checked in anon which means be an anonymous user, or don’t show up.

    When I uncheck the field, the value for anon goes to y. If I check it, it goes to blank. This is for a Member account I was testing with.

  • #5 / Jan 27, 2011 12:40pm

    Kevin Gerich

    213 posts

    OK.  so I think I’m getting how this variable works now.
    I also found where it is called and entered in the mod.member_auth.php

    So checked == “” unchecked == “y”, and “y” means don’t show me in the list!

    Not super intuitive but I get how it works now.

    I am so used to always doing something like

    checked == “y” or “1” and unchecked == “n” or “0”

    Thanks,  off to add this to my plugin.

    Regards,

    jim

  • #6 / Jan 28, 2011 2:12am

    John Henry Donovan

    12339 posts

    Glad you figured it out. Feel free to start a new thread if you have any more questions

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases