# |
Jul 3rd 2017, 22:52 |
phpnut |
you should be able to follow and get notices on github |
# |
Jul 3rd 2017, 22:51 |
phpnut |
we are working on the roadmap |
# |
Jul 3rd 2017, 22:48 |
ben |
Other than the Github page, what's the best way to follow activity on the Phinx project as it transitions under cakephp? Any option for active notifications? Is there/will there be a roadmap? Will it remain framework agnostic in its historical current sense? |
# |
Jul 3rd 2017, 21:59 |
jeremyharris |
np |
# |
Jul 3rd 2017, 21:59 |
smarty24 |
Thank you |
# |
Jul 3rd 2017, 21:59 |
jeremyharris |
:+1: good luck |
# |
Jul 3rd 2017, 21:59 |
jeremyharris |
or like I said, just have a method that generates it based on known values |
# |
Jul 3rd 2017, 21:59 |
smarty24 |
Cool... thanks |
# |
Jul 3rd 2017, 21:58 |
jeremyharris |
a hash is plain text; so you can generate and store |
# |
Jul 3rd 2017, 21:58 |
smarty24 |
will be stored in db as plain text after hash or the table column as md5? |
# |
Jul 3rd 2017, 21:56 |
jeremyharris |
like md5(user_id . job_id . user_banned . salt) or something |
# |
Jul 3rd 2017, 21:55 |
jeremyharris |
the token could be a deterministic hash, but that would be harder to revoke unless the hash had some information in it regarding whether the user was allowed or not |
# |
Jul 3rd 2017, 21:54 |
jeremyharris |
makes it easy to revoke :slightly_smiling_face: |
# |
Jul 3rd 2017, 21:54 |
smarty24 |
Thanks Jeremy. Just what I thought but wasn't sure if it was a good practice to store token in the db |
# |
Jul 3rd 2017, 21:54 |
jeremyharris |
$context[‘data’] is all the data passed to it, though, which is usually request data |
# |
Jul 3rd 2017, 21:54 |
jeremyharris |
validators are unaware of requests, they simply validate an array |
# |
Jul 3rd 2017, 21:53 |
gutts |
not just the context field |
# |
Jul 3rd 2017, 21:53 |
gutts |
is there a way to access request data in a validator entirely? |
# |
Jul 3rd 2017, 21:52 |
jeremyharris |
I hope I’m not doing your homework :) |
# |
Jul 3rd 2017, 21:52 |
jeremyharris |
got it. well, then putting it into the db on the jobs table would be best, as each job should only be editable if the user has the token for it. regenerating the token then becomes as easy as replacing the db field and sending the email again |
# |
Jul 3rd 2017, 21:50 |
smarty24 |
To make it clearer. I am requested to develop sample php job portal using cakephp and job posters will get an email notification after posting with a link to be able to edit or delete post. The link should include a token... Which is where I am confused why a token and if it should be stored in the db or generated each time |
# |
Jul 3rd 2017, 21:48 |
jeremyharris |
is someone generating the tokens in an admin panel or something? I don’t understand the purpose of it. What not just make edit public at that point? |
# |
Jul 3rd 2017, 21:48 |
smarty24 |
I am assume not, because it will appear on the url. |
# |
Jul 3rd 2017, 21:46 |
jeremyharris |
is it meant to be secret? reusable? |
# |
Jul 3rd 2017, 21:46 |
smarty24 |
No, it is not for login. The link is intended for use to edit and delete posted jobs on the portal. |
# |
Jul 3rd 2017, 21:40 |
jeremyharris |
is it a login token of some sort? |
# |
Jul 3rd 2017, 21:40 |
jeremyharris |
depends what you’re using the token for I suppose :slightly_smiling_face: |
# |
Jul 3rd 2017, 21:38 |
smarty24 |
Hi Masters, I have a quick question. I have task to do a sample job portal which has a link like this: jobboard.local/jobs/edit/256?token=asddas1221d1asdkjd122kj .... The last part should be a token which is where my question lies. Must this token be generated once and stored in the database or has to be generated all the time page is visited? |
# |
Jul 3rd 2017, 21:38 |
jeremyharris |
$items[0]->plan->numberofbooks |
# |
Jul 3rd 2017, 21:37 |
jeremyharris |
I mean, you had to pass it to the view in the first place :slightly_smiling_face: |
# |
Jul 3rd 2017, 21:37 |
jeremyharris |
you can just use whatever var you set in the controller |
# |
Jul 3rd 2017, 21:29 |
clementcrown |
i have that in the view, but i want to get the value in the controller cos I still wanna use it in there |
# |
Jul 3rd 2017, 21:29 |
clementcrown |
i want something like this echo ['items']['plan']['numberofboos']; |
# |
Jul 3rd 2017, 21:28 |
clementcrown |
given this array https://gist.github.com/clementcrownrise/7f8f7e1cb02044767e8c55dd81ce376c , please how can i get the [plan][numberofbooks] value in the controller |
# |
Jul 3rd 2017, 21:20 |
angelxmoreno |
@burzum :eyes: |
# |
Jul 3rd 2017, 19:30 |
jeremyharris |
and, the entity after patching/creating it? |
# |
Jul 3rd 2017, 19:30 |
jeremyharris |
can you gist the save process you’re doing? |
# |
Jul 3rd 2017, 19:26 |
devito |
yes they do |
# |
Jul 3rd 2017, 19:18 |
jeremyharris |
@devito do those tables have the Timestamp behavior? if not, that’s probably the problem |
# |
Jul 3rd 2017, 18:56 |
sdf4sd545 |
-- |
# |
Jul 3rd 2017, 18:29 |
devito |
getting an odd error when i try to make a new entity and save it. its telling me created cannot be null.... anyone ever encounter this? I baked the migration with created modified as the last 2 cols |