Zfc User Part 1

In this tutorial of ZfcUser, I'll guide you to install ZfcUser and a little bit of detail about the module. So lets get started with the installation of the ZfcUser. To begin with first lets have a fresh installation in Zend Framework. To install Zend Framework Skeleton, you need to have git installed on your system. Download git from here. An alternative is to install github on your system.

After installing git on your system. Now you need to goto your www folder of your wamp. When inside the www folder right click and than click git bash here. In the window copy paste the line below to download Zend Framework Skeleton on you machine.

git clone https://github.com/zendframework/ZendSkeletonApplication.git zfcUserTutorial

Zend Framework recomends that we should create a virtual host. So lets create a virtual host as well. Copy paste the below code to setup a virtual host. Paste the code either in httpd.conf at the end of the file or in the vhost.conf file.

    DocumentRoot "path_to_your_www_directory/zfcUserTutorial/public/"
    ServerName local.zfclrphpttutorial.com
    ServerAlias zfclrphpttutorial.com
    ErrorLog "path_to_your_www_directory/zfcUserTutorial/error.log"

After this now press "window+r" key and type drivers and enter. From list of directories or folders select etc. Add the below line in host file. local.zfclrphpttutorial.com

Now Save the file and restart apache. After restarting apache you should see the Zend Framework skeleton application instructing you to download zend framework. Now lets do that as well.

In your git command line window browse to the zfcUserTutorial directory. Now type in the following command to download Zend Framework via composer. But before that lets edit the composer.json file to download ZfcUser as well. In the require section add the following lines and save composer.json file.

"zendframework/zend-developer-tools": "dev-master",
"zf-commons/zfc-user": "1.*",
"rwoverdijk/assetmanager" : "1.*"

Now in the command line type in the following line.

php composer.phar install

As you can see I've added two additional modules. These are the basic modules which will help you alot in development. Now for the final steps copy module.zfc-user.global.php to root_path/config/autoload/ also copy file from vender/zendframework/zend-developer-tools/config/zenddevelopertools.local to config/autoload/ directory. Last but not the least add 'ZendDeveloperTools','AssetManager', 'ZfcBase', 'ZfcUser', to modules key in application.config.php

At last you've successfully installed ZfcUser at your machine. Now in the next post I'll guide you through the code of ZfcUser. For now play around with ZfcUser by registering some local members. The urls to play with ZfcUser are as follows:

  • local.zfclrphpttutorial.com/user/login
  • local.zfclrphpttutorial.com/user/logout
  • local.zfclrphpttutorial.com/user/register
  • local.zfclrphpttutorial.com/user/change-password
  • local.zfclrphpttutorial.com/user/change-email
Enjoy ZfcUser and also at the same time curse it what sort of a user registration module is it. Not to worry I'll help you get a hand of it and Zend Framework via this awesome Module. Enjoy!!!.