Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Output value of nested arrays?

  • This topic is empty.
Viewing 9 posts - 31 through 39 (of 39 total)
  • Author
    Posts
  • #121142
    __
    Participant

    @chrisburton

    Everywhere I see it in that article, `isset()` (and/or `empty()`) is being used during the oauth process – e.g., to check what the response returned. The Opauth example does this as well (are you still using the opauth class?).

    Yes, those checks should remain.

    However, don’t use them when(if) you’re accessing the results via the `twitter_user` class:

    #no
    if( isset( $twitter_user->name ) ){
    print $twitter_user->name;
    }

    #yes
    print $twitter_user->name;

    *****
    **edit**

    *Also, the code in that article uses the mysql_…() functions.*

    *ext/mysql is long outdated and will be deprecated in PHP 5.5. It **should not be used** in new work (try [ext/mysql**i**](http://php.net/mysqli) or [PDO](http://php.net/pdo) instead).*

    #121143
    chrisburton
    Participant

    @traq I mean, as long as it’s secure, I’m not worried about it. I just want to make sure the users info is not vulnerable. It looks like I have a lot to learn. By the way, when you get Kirby up and running, I’d love to see you create a plugin that does this.

    Regarding Opauth class, I’m not sure. What I sent you is what I am still using. I just pasted your code below the code that Opauth comes with.

    #121164
    __
    Participant

    @chrisburton

    Keeping the checks will prevent errors. It may not lead directly to security vulnerabilities, but it definitely makes for better UX and also best coding practice.

    > It looks like I have a lot to learn.

    Everyone does. That’s the fun part.

    > By the way, when you get Kirby up and running, I’d love to see you create a plugin that does this.

    Maybe. I’ll have to see how easy it is to integrate.

    > I just pasted your code below the code that Opauth comes with.

    which is exactly what I did; works great (that example is on one of my old domains that is still running PHP 5.2). Taking the code you gave me, those minor changes to my class are all it took.

    #121177
    TheDoc
    Member

    @traq – super forum props for helping Chris out with this. I’ve been following this thread and have admired your dedication to the problem!

    #121187
    __
    Participant

    @TheDoc – thanks very much. I’ve enjoyed it …and my own projects may benefit from this as well :)

    #121198
    chrisburton
    Participant

    @traq @TheDoc Yes, absolutely. I really appreciate all the help that you have given. I’m glad that we can both benefit from this as well. Thank you for everything.

    My apologies for being MIA for the past couple of days. It’s been stressful getting everything ready for this semester of college.

    #121219
    __
    Participant

    You’re quite welcome, thank you.

    Just to clarify, is this working for you now?

    #121220
    chrisburton
    Participant

    @traq Working 100%. Much easier to write also so that’s a definite plus. Thanks again, I owe you one.

    #121232
    __
    Participant

    no prob. cool.

Viewing 9 posts - 31 through 39 (of 39 total)
  • The forum ‘Back End’ is closed to new topics and replies.