Archive for June 17th, 2006

WeberDev.com: User Authentication With patUser (Part 2)

From WeberDev today, there’s part two of their “User Authentication with patUser” series, this timie with a focus on managing user data with other patUser functionality.

patUser can do a lot more than just handle user authentication - the
library also comes with a large number of methods designed to make the task of managing user data as simple and efficient as possible. Over the course of this second installment, I’m going to show you how these methods work, and how they can be used to quickly create scripts to view, add, edit and delete users (and user attributes) from your database. Keep reading!

They build on the previous article’s foundation (and database) to insert some new user information for manipulation and output. They then give some sample code to pull all of the users from the database, pull details for each user (including additional fields created in a database update), and limiting the results based on one of the fields.

They also include another database table and the needed code to help organize the users into groups. They also include the functionality to add and remove groups and users as well as adding and removing people to/from groups directly from the patUser setup. Finally, they finish it with a few “real life” examples to help it all make sense together.

Continue Reading · Add comment

Community News: php/db|works Speakers Announce

This year’s php|works / db|works conference is coming up in September, and the speakers have been chosen to give their talks. Several of them have also posted to this fact in their blogs:

  • Wez Furlong will be giving his “usual talk” on PDO as well as a brand new one covering “PHP and Mail: Best Practices”
  • Sara Goleman giving a three hour workshop on Extension writing and an hour in another talk covering PDO_User
  • Sebastian Bergmann presenting two talks - “Testing PHP Applications” and “The State of AOP in PHP”

The rest of the schedule has also been posted, and includes other PHP notables such as Rasmus Lerdorf, Chris Shiflett, Paul Reinheimer, and Ilia Alshanetsky.

Continue Reading · Add comment

Greg Beaver’s Blog: A parser generator for PHP - *finally*

Greg Beaver has a new post today with mentions of a few things, but mainly the work that he’s done to create a parser generator in PHP.

About three weeks ago, I looked at the state of the parser generator world out there for PHP, and it is pretty dismal. Antlr3 will theoretically support PHP 5 generation, but it’s impossible to find any source in spite of several fruitless hours of googling.

I finally decided that if this is ever going to happen, I’ll have to get off my butt and do it. So, two weeks ago, I grabbed the source of the Lemon parser generator from its website

He follows the path he took, using the code from the Lemon parser, translating it into a PHP version, and correcting a few bugs along the way.

In the process, I have a fully working PGN file parser that will make its way into a PEAR proposal as soon as I get around to integrating it with Games_Chess to do full validation of the contents of the PGN file. However, the parser works 100% even with some of the weirdest PGN things I could throw at it.

He finishes off the post with some example code, including a method for using it on the command line. You can grab the code for the project and related files here

Sebastian Bergmann also comments in his blog about the work Greg’s done.

Continue Reading · Add comment