Log message #4170971

# At Username Text
# Oct 9th 2018, 09:15 neon1024 `Collection::indexBy()`
# Oct 9th 2018, 09:06 rrd564 Is there a way to sort a collection by the index of its items? Something like ksort for arrays? The collection is after a groupBy and I want to sort after the grouping
# Oct 9th 2018, 09:01 martin update of my problem yesterday, it was just a fileserver that was not responding 100% :P
# Oct 9th 2018, 09:01 martin Morning :)
# Oct 9th 2018, 08:56 neon1024 Morning all :wave:
# Oct 9th 2018, 08:52 dereuromark remove the specific file
# Oct 9th 2018, 08:49 blancessanchez30 aside from $this->redirect('/'), what are the other redirection
# Oct 9th 2018, 08:44 lubos @dereuromark what is the best way to clear just TinyAuth cache?
# Oct 9th 2018, 07:26 xenogew If i want to adopt Twitter bootstrap as css framework. What should I do? What I googled are downloading->copying method, a lot of plugin and forks. I prefer the way using `composer require` method, can anyone guide me how to accomplish that?
# Oct 9th 2018, 07:17 rightscoreanalysis it's a bug because I call this on another collection with the same structure
# Oct 9th 2018, 07:16 rightscoreanalysis does anyone know what this means: Hash::combine() needs an equal number of keys + values.
# Oct 9th 2018, 05:13 zomb leaving it as 'alphanumeric' for now
# Oct 9th 2018, 05:13 zomb meh going to bed
# Oct 9th 2018, 05:08 zomb and then ```public function isUsername($username, $context) { return preg_match('/^[a-zA-Z0-9_]{3,20}$/', $username); }```
# Oct 9th 2018, 05:07 zomb ``` 'rule' => [$this, 'isUsername'], 'message' => "..." ```
# Oct 9th 2018, 05:07 zomb tried that... still not working
# Oct 9th 2018, 05:05 blancessanchez30 @zomb
# Oct 9th 2018, 05:05 blancessanchez30 make a custom function for regex validation
# Oct 9th 2018, 05:04 zomb sorry it's late... why won't this validate via regex? ``` ->add('username', 'isUsername', [ 'rule' => ['custom', ['/^[a-zA-Z0-9_]{3,}$/']], 'message' => 'Username can only contain letters, numbers and underscores.' ])```
# Oct 9th 2018, 03:50 zomb and switch your `Session` section in `config/app.php`
# Oct 9th 2018, 03:50 zomb basically create the table in your DB
# Oct 9th 2018, 03:50 zomb whoops meant to link to the section: https://book.cakephp.org/3.0/en/development/sessions.html#database-sessions
# Oct 9th 2018, 03:49 zomb start with a review of the docs: https://book.cakephp.org/3.0/en/development/sessions.html
# Oct 9th 2018, 03:47 blancessanchez30 were there any tutorials that could help me?
# Oct 9th 2018, 03:47 zomb @blancessanchez30 it's easy to switch, and there are lots of benefits in scalability
# Oct 9th 2018, 03:18 zomb @blancessanchez30 i had a similar issue, and for lots of reasons, i moved to database sessions instead of the php... docs were confusing
# Oct 9th 2018, 01:21 blancessanchez30 when i refresh the page, the session is still there
# Oct 9th 2018, 01:21 blancessanchez30 ``` 'Session' => [ 'defaults' => 'php', 'timeout' => 1, 'ini' => [ 'session.cookie_lifetime' => 5 ] ],```
# Oct 9th 2018, 01:18 blancessanchez30 Hello how to have session timeout in cakephp 3?
# Oct 9th 2018, 01:00 zomb i'm trying to use Mailer within a Command, for the curious
# Oct 9th 2018, 00:58 zomb how does the new Mailer architecture pick the email configuration for sending?
# Oct 8th 2018, 22:38 rightscoreanalysis there is no correlation imo to the book example, sheer brute force made it work - nothing else!
# Oct 8th 2018, 22:38 rightscoreanalysis this worked: $propertyPeriods = Hash::combine($propertyPeriods, '{n}.{n}.id', '{n}.0');
# Oct 8th 2018, 22:19 rightscoreanalysis either the book is not very well written or I am lacking
# Oct 8th 2018, 22:19 rightscoreanalysis $result = Hash::remove($propertyPeriods, '{n}.[0].Data');
# Oct 8th 2018, 22:19 rightscoreanalysis why does this not shift the array up one index?
# Oct 8th 2018, 22:08 rightscoreanalysis man alive this is challenging
# Oct 8th 2018, 21:57 rightscoreanalysis actually I don't think the Hash class will work in this case
# Oct 8th 2018, 21:53 rightscoreanalysis that what I was thinking
# Oct 8th 2018, 21:53 dereuromark also Hash::extract, combine etc can help here
# Oct 8th 2018, 21:52 dereuromark instead, if you need, assign it to a different array.