Log message #4020231

# At Username Text
# Apr 26th 2017, 09:15 birdy247 Neon1024 User hasMany Participants
# Apr 26th 2017, 09:14 Neon1024 What would I do with a valid login on an ‘archived’ user account?
# Apr 26th 2017, 09:13 Neon1024 I’d also then, after that, think about logins if there are two users are they trying to login with both accounts
# Apr 26th 2017, 09:13 Neon1024 Then I could feed back to users easily about which races have been ‘automerged’ into their account
# Apr 26th 2017, 09:13 Neon1024 As I’d have a status_id field, I’d just create a new status with that in
# Apr 26th 2017, 09:12 Neon1024 Also probably mark new races with a status of ‘merged’ or something, so I can tell which stuff changed
# Apr 26th 2017, 09:12 Neon1024 Probably with a cascade to mark all the old users data as inactive
# Apr 26th 2017, 09:12 Neon1024 Then I’d add archiving the old user
# Apr 26th 2017, 09:11 Neon1024 Then I’d recfactor it to allow more than one user to be merged
# Apr 26th 2017, 09:11 Neon1024 I’d write a shell to find a user, and then another user, and just add the races from user 2 into user 1 and re-save user 1
# Apr 26th 2017, 09:03 birdy247 I want to merge 2 INTO 1, so user 1 now has 1,2,3,5,6 races
# Apr 26th 2017, 09:03 birdy247 in this case, user 1 and 2 are actually the same person, they registered twice with 2 different emails (doh) and user 1 entered races 1,2,3 and user 2 entered races 5,6
# Apr 26th 2017, 09:02 birdy247 a User hasMany Participants
# Apr 26th 2017, 09:02 birdy247 Ok, bit more context
# Apr 26th 2017, 09:01 Neon1024 Will it
# Apr 26th 2017, 09:00 birdy247 the merger class will pass back what needs to be saved?
# Apr 26th 2017, 09:00 birdy247 so pass it some data,
# Apr 26th 2017, 09:00 birdy247 right
# Apr 26th 2017, 08:59 Neon1024 Give things their dependancies, dont’ have them reach out for them
# Apr 26th 2017, 08:59 birdy247 i.e. updating FK's
# Apr 26th 2017, 08:59 birdy247 to give context, the class will be "merging" duplicate user accounts
# Apr 26th 2017, 08:59 Neon1024 Erm, accidental caps
# Apr 26th 2017, 08:59 Neon1024 YES
# Apr 26th 2017, 08:59 birdy247 Should I be passing the entities to the class instead
# Apr 26th 2017, 08:59 Neon1024 It is
# Apr 26th 2017, 08:58 birdy247 It seems "wrong" that the class will be retrieving entities
# Apr 26th 2017, 08:58 birdy247 I am making a new class in my Lib folder as I want to share the logic between a shell and model
# Apr 26th 2017, 08:23 johnwayne I want to write manual address in case that id = 3
# Apr 26th 2017, 08:23 johnwayne I am using now protected function _getFullAddress() { return $this->_properties['address'] . ' ' . $this->_properties['building_number'] . ', ' . $this->_properties['postal'] . ' ' . $this->_properties['city']; }
# Apr 26th 2017, 08:23 johnwayne Is there way to define virtual field with conditions. If id == 3 than create own name?
# Apr 26th 2017, 08:22 steinkel @joshuaso91 you have specific documentation here https://github.com/CakeDC/users/blob/master/Docs/Documentation/Extending-the-Plugin.md#extending-the-model-tableentity> and a working example here <https://ide.c9.io/steinkel/users-example-custom-table you could clone/review
# Apr 26th 2017, 08:21 chris-andre I find using migrations very nice and helpful.
# Apr 26th 2017, 08:21 chris-andre @joshuaso91 Ofc you don't have to use migrations to set up database. You can use your own sql files or what ever.
# Apr 26th 2017, 08:18 joshuaso91 @digitalfotografen Hey there Digitalfotografen, I got a question, if i dont want to migrate the users table and just use my own that i already have, can i just skip that step?
# Apr 26th 2017, 08:12 inoas Nitpick @PR https://github.com/cakephp/cakephp/pull/10583/files#diff-7c230f89390b8e761527d8e592166f4fR395: Can we find one way in the core to concat Exceptions with variables? / Examples: https://3v4l.org/XpvHW / To Curley or To Not Curley: http://stackoverflow.com/a/2596838
# Apr 26th 2017, 07:44 metoyoko @ndgAl thank you. god bless
# Apr 26th 2017, 07:42 ndgAl sorry, I have to go, good luck
# Apr 26th 2017, 07:42 ndgAl @metoyoko like @chris-andre says, you must `debug($this->request->getData())` to check if your associated data is present and the structure looks conform to what Cake expect to marshal it. Then Debug($article) will inform you if it correctly process the data and if dirty property is true to persist it
# Apr 26th 2017, 07:42 birdy247 morning
# Apr 26th 2017, 07:41 metoyoko sometimes she not used plural in table name like cms_ref_status
# Apr 26th 2017, 07:40 metoyoko @ndgAl but my tables has suffix like cms_articles and field just article_id. db admin already established current db and we argue on that but she insist not to follow cake naming convention :(