Log message #4121781

# At Username Text
# Mar 5th 2018, 11:51 neon1024 Perhaps this is an indication that the docs need tweaking?
# Mar 5th 2018, 11:51 dereuromark also it breaks non-stateless approach usually, and has other cavities
# Mar 5th 2018, 11:50 neon1024 I also wouldn’t want to have a component being accessed from my view layer
# Mar 5th 2018, 11:50 dereuromark Or, if you use tinyauth AuthUser helper: `$this->AuthUser->user('username')`. No, never ever use AuthComponent here, and statically even never ever ever :slightly_smiling_face:
# Mar 5th 2018, 11:49 edgaras.jan `AuthComponent::user('username')` https://book.cakephp.org/3.0/en/controllers/components/authentication.html#accessing-the-logged-in-user
# Mar 5th 2018, 11:48 neon1024 `getSession()` now, if you’re on 3.4+
# Mar 5th 2018, 11:48 neon1024 I use this personally, `$this->request->session()->read('Auth.User.username')`
# Mar 5th 2018, 11:47 neon1024 If you’re using the AuthComponent you should be able to read it from the Session
# Mar 5th 2018, 11:42 portilloster Hi guys! Can you please help me with this basic problem? In the default layout template I want to show the logged User Name in this div: <div class="top-bar-section"> <ul class="right"> <li><a target="_blank" href="#">USER_NAME</a></li> </ul> </div> How can I do this? Thanks!!!
# Mar 5th 2018, 11:21 dereuromark always check log files here, they contain the info you need.
# Mar 5th 2018, 11:20 ghoritrilochan File uploaded https://cakesf.slack.com/files/U73224C20/F9KC9UN30/image.png / https://slack-files.com/T053DPNCM-F9KC9UN30-9dd8ed1088
# Mar 5th 2018, 11:20 ghoritrilochan hii.. plesk in host my first project. plz help
# Mar 5th 2018, 09:44 em. @dereuromark ok thx! :slightly_smiling_face:
# Mar 5th 2018, 09:40 dereuromark compsoser.json I mean
# Mar 5th 2018, 09:40 dereuromark I keep it lean. Adding the initial code and composer.install so I can composer require it in my app, then finalizing it from there with the ability of doing testing and also in-app-testing.
# Mar 5th 2018, 09:35 em. So what is your approach on this? If you start a new cakephp plugin?
# Mar 5th 2018, 09:24 dereuromark They would be in vendor then usually, though.
# Mar 5th 2018, 09:23 dereuromark Sure, you can do that. Whatever works for you.
# Mar 5th 2018, 09:22 em. Hey, good morning! What would be the best workflow for developing, test and maintain all your (private) cakephp plugins? For example, should i make a fresh cakephp project, and maintain my packages in the plugin folder; which all contain git repositories? Or is there a better approach? I can’t find any good reads about it. Maybe someone can point me to the right direction…
# Mar 5th 2018, 09:16 dereuromark You could use my Passwordable behavior (in Tools plugin) which ships this functionality out of the box
# Mar 5th 2018, 09:02 clementcrown good morning all
# Mar 5th 2018, 09:02 clementcrown hi, please how can I make this work like ->add('password','create',['equalToField'=>'password_confirm'])
# Mar 5th 2018, 08:39 scottmkroberts Morning
# Mar 5th 2018, 08:34 neon1024 Morning all
# Mar 4th 2018, 18:15 makallio85 It helped me to think this matter from different perspective.
# Mar 4th 2018, 18:15 makallio85 Okay. Thanks for your opinion.
# Mar 4th 2018, 18:14 savant sure thats fine
# Mar 4th 2018, 18:11 makallio85 Just to be clear, for example. If I have invoice_items table that contains possible items user can choose to be included in invoice, i wont actually link my invoices table to that table directly but copy selected items to "invoice_item_states" table and (that has all item data in separate columns) link invoice to that table in order to have this metadata available?
# Mar 4th 2018, 18:08 savant yeah these tables have state, you can version things explicitly and reference that version for anything that needs to be “hardcoded”
# Mar 4th 2018, 18:07 savant etc.
# Mar 4th 2018, 18:07 savant invoice_items
# Mar 4th 2018, 18:06 makallio85 Probably some of this data would go to invoices table of course. But several objects do have state.
# Mar 4th 2018, 18:04 makallio85 in single table as json for example or splitted tables with splitted columns?
# Mar 4th 2018, 18:03 makallio85 I mean, customer, related widgets, client, payment terms, dates etc
# Mar 4th 2018, 18:03 makallio85 But. Would you have single table for states for all kind of objects or separate ones?
# Mar 4th 2018, 18:02 makallio85 Yes. That is what I meant. I just couldnt explain myself correctly.
# Mar 4th 2018, 18:01 savant as in, quantity, any metadata about the widget, etc.
# Mar 4th 2018, 18:01 savant i would have a table with the widget state at the time of purchase :slightly_smiling_face:
# Mar 4th 2018, 18:00 makallio85 :) Would you go with data revisioning instead?
# Mar 4th 2018, 18:00 savant ¯\_(ツ)_/¯
# Mar 4th 2018, 18:00 savant I guess you can do that