Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regarding message-IDs #263

Open
michael-e opened this issue Sep 16, 2014 · 1 comment
Open

Regarding message-IDs #263

michael-e opened this issue Sep 16, 2014 · 1 comment

Comments

@michael-e
Copy link
Member

I reverse-engineered a bit to understand the Members message IDs.

Defined in Members lib/class.membersevent.php:

const MEMBER_ERRORS = 104;
const MEMBER_INVALID = 105;

const SECTION_INVALID = 201;

const ACTIVATION_PRE_COMPLETED = 303;
const ACTIVATION_CODE_INVALID = 304;
const RECOVERY_CODE_INVALID = 305;

const ALREADY_LOGGED_IN = 501;

Defined in the Symphony core (lib/toolkit/events/class.event.section.php):

const UNKNOWN_ERROR = 0;

const ENTRY_CREATED_SUCCESS = 100;
const ENTRY_EDITED_SUCCESS = 101;
const ENTRY_ERRORS = 102;
const ENTRY_MISSING = 103;
const ENTRY_NOT_UNIQUE = 104;

const SECTION_MISSING = 200;

const FIELD_MISSING = 301;
const FIELD_INVALID = 302;
const FIELD_NOT_UNIQUE = 303;

const FILTER_FAILED = 400;

const SECURITY_XSRF = 500;

Used in Members:

events/event.members_activate_account.php
    MEMBER_ERRORS
    ACTIVATION_PRE_COMPLETED
    ACTIVATION_CODE_INVALID
events/event.members_generate_recovery_code.php
    ALREADY_LOGGED_IN
    MEMBER_ERRORS
events/event.members_regenerate_activation_code.php
    MEMBER_ERRORS
    ACTIVATION_PRE_COMPLETED
events/event.members_reset_password.php
    MEMBER_ERRORS
    RECOVERY_CODE_INVALID
fields/field.memberemail.php
    MEMBER_INVALID
fields/field.memberpassword.php
    MEMBER_INVALID
fields/field.memberusername.php
    MEMBER_INVALID
lib/class.membersevent.php
    MEMBER_ERRORS
    FILTER_FAILED

There are two things that are a bit strange:

  • SECTION_INVALID is defined in Members, but never used.
  • There is a number clash with 303, which means different things in the core and in Members. Shouldn't we avoid that?
@nilshoerrmann
Copy link
Contributor

104 clashes as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants