In this episode we are going to build a User Login system following these steps:
- We will build a Login Form View and a Login Controller.
- Learn about some URL Helpers.
- Change the Default Controller.
- Implement User Authentication.
- Learn about Singleton Pattern and use it to improve our code design.
- Learn about the Sessions Library.
- Implement User Logout.

"CodeIgniter and Doctrine from Scratch" Series:
Login Form View
First thing we are going to do is to create the View for the Login Form.
We are going to make this one very similar to the Signup Form we created in the last article.
- Create: system/application/views/login_form.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Login Form</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>css/style.css"
type="text/css" media="all">
</head>
<body>
<div id="signup_form">
<p class="heading">User Login</p>
<?php echo form_open('login/submit'); ?>
<?php echo validation_errors('<p class="error">','</p>'); ?>
<p>
<label for="username">Username: </label>
<?php echo form_input('username',set_value('username')); ?>
</p>
<p>
<label for="password">Password: </label>
<?php echo form_password('password'); ?>
</p>
<p>
<?php echo form_submit('submit','Login'); ?>
</p>
<?php echo form_close(); ?>
<p>
<?php echo anchor('signup','Create an Account'); ?>
</p>
</div>
</body>
</html>
All I did was copy the contents of the signup form, change the page title, remove some form fields and added a link at the bottom to the signup form.
anchor()
On Line 33 in the file above, I used a function named anchor(). This is part of the URL Helper in CodeIgniter. It helps us create links with ease. The first argument is the Controller Name, and the second argument is the Link Text. You can also pass an optional third argument for extra html attributes. The result is:
<a href="http://localhost/ci_doctrine/signup">Create an Account</a>
Style the links
I am just going to make a small addition to the stylesheet so our links look better.
- Edit: css/style.css
body {
font-family: "Trebuchet MS",Arial;
font-size: 14px;
background-color: #212426;
color: #11151E;
}
a {
color: #FFF;
}
a:hover {
color: #B9AA81;
}
/* ... */
I only added the highlighted lines.
Link from the Signup Form
Likewise, we will add a link from the Signup Form to the new Login Form.
- Edit: system/application/views/signup_form.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Signup Form</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>css/style.css"
type="text/css" media="all">
</head>
<body>
<div id="signup_form">
<p class="heading">New User Signup</p>
<?php echo form_open('signup/submit'); ?>
<?php echo validation_errors('<p class="error">','</p>'); ?>
<p>
<label for="username">Username: </label>
<?php echo form_input('username',set_value('username')); ?>
</p>
<p>
<label for="password">Password: </label>
<?php echo form_password('password'); ?>
</p>
<p>
<label for="passconf">Confirm Password: </label>
<?php echo form_password('passconf'); ?>
</p>
<p>
<label for="email">E-mail: </label>
<?php echo form_input('email',set_value('email')); ?>
</p>
<p>
<?php echo form_submit('submit','Create my account'); ?>
</p>
<?php echo form_close(); ?>
<p>
<?php echo anchor('login','Login Form'); ?>
</p>
</div>
</body>
</html>
I only added the highlighted lines.
Note: We just linked to a Controller named login. This Controller does not exist yet. So let’s create it.
Login Controller
First we are going create a sort of skeleton structure for our new Controller.
- Create: system/application/controllers/login.php
<?php
class Login extends Controller {
public function __construct() {
parent::Controller();
$this->load->helper(array('form','url'));
$this->load->library('form_validation');
}
public function index() {
$this->load->view('login_form');
}
public function submit() {
if ($this->_submit_validate() === FALSE) {
$this->index();
return;
}
redirect('/');
}
private function _submit_validate() {
}
}
This looks very similar to the submit Controller we created in the last article. The only new thing is the highlighted line.
redirect()
This function is part of the URL Helper. It forwards the surfer to a specified Controller. In this case we only passed ‘/’, which will basically send the surfer to the Home Page or in other words the Default Controller.
So the user will end up at http://localhost/ci_doctrine/.
Test The Login Controller+View
- Go here: http://localhost/ci_doctrine/login

- Now click the link that says Create an Account.
You should see our old Signup Form page.

Works great!
Default Controller
When someone visits the main page of our website (i.e. there is no controller name in the url), it calls the Default Controller. Right now if you go to http://localhost/ci_doctrine/, you will see this:

Because CodeIgniter is loading a Controller named welcome by default.
Let’s say we would like to have a Default Controller named home instead.
- Create: system/application/controllers/home.php
<?php
class Home extends Controller {
public function index() {
echo "Home Sweet Home!";
}
}
Routes File
- Edit: system/application/config/routes.php
Changing just one line:
// ... $route['default_controller'] = "home"; $route['scaffolding_trigger'] = ""; // ...
That’s it. Now when you go to http://localhost/ci_doctrine/, you will see our controller:
Home Sweet Home!
The Routes File has some other purposes, which we will not get into right now. But you can read more about it here.
User Login (Authentication)
Now that our forms are in place, we need to add authentication functionality to our application.
First I want to show you how to accomplish it in a simple and most common way. Once we cover that, I will show you a better way of handling this.
Authentication with Form Validation
- Edit: system/application/controllers/login.php
<?php
class Login extends Controller {
public function __construct() {
parent::Controller();
$this->load->helper(array('form','url'));
$this->load->library('form_validation');
}
public function index() {
$this->load->view('login_form');
}
public function submit() {
if ($this->_submit_validate() === FALSE) {
$this->index();
return;
}
redirect('/');
}
private function _submit_validate() {
$this->form_validation->set_rules('username', 'Username',
'trim|required|callback_authenticate');
$this->form_validation->set_rules('password', 'Password',
'trim|required');
$this->form_validation->set_message('authenticate','Invalid login. Please try again.');
return $this->form_validation->run();
}
public function authenticate() {
// get User object by username
if ($u = Doctrine::getTable('User')->findOneByUsername($this->input->post('username'))) {
// this mutates (encrypts) the input password
$u_input = new User();
$u_input->password = $this->input->post('password');
// password match (comparing encrypted passwords)
if ($u->password == $u_input->password) {
unset($u_input);
return TRUE;
}
unset($u_input);
}
return FALSE;
}
}
Highlighted functions have been updated.
First I added some form validation rules inside the _submit_validate() function, like in the last article. But this time I added a Callback rule. Notice on Line 29: callback_authenticate. The format is callback_[function_name].
On Line 34 I set a custom message for this validation rule, in case it fails.
Then I added the function named authenticate. This callback function needs to return TRUE when everything is good, and FALSE when the validation fails.
Lines 43-53: This is where I perform the username and password check for the login. First I attempt to get the User Record searching by the input username. (We learned about the getTable and findOneBy* functions in the last article).
Applying the Mutator to an external value
Remember we added a Mutator to the password field in the last article?
Since the stored passwords are encrypted, I need to apply the same encryption to the user input, before I can compare the two.
That’s why I create a new User object named $u_input. on Line 46 and assigned the input password to it. This is how I trigger the Mutator function on the password that was entered in the form. (If anyone knows a better of doing this, let me know!)
Now the encrypted version of the input password resides in $u_input->password. So I was able to compare it to $u->password.
I also unset the $u_input object, just to make sure it doesn’t get saved as a new record by accident.
Testing the Form
First create a new user by going to the Signup Form at http://localhost/ci_doctrine/signup.
Now go to: http://localhost/ci_doctrine/login and use a wrong login. You should see:

When you use a correct login, you should get forwarded back to the home page.
Home Sweet Home!
Our Login Form works!
Now the Better Way!
I mentioned I was going to change things a bit and show you how to do this in a better way.
What’s wrong with the current method?
- I don’t like how the authentication code is all inside the Controller. This is not good for code reusability.
- It should be part of the User Model, since it’s directly related to it.
- We stored the User Record in a variable named $u. But it’s inside a function and not global. So, if other Controllers need to use it, they can’t.
- Turning the object $u directly into a Global Variable would be a bad design decision.
- We do not want to store the whole user object inside the session. Doctrine Models have a lot of internal data, which could quickly inflate the size of our session storage. Only thing we are going store in the session is the user_id.
Singleton Pattern to the rescue!
Some of you may not know what Singleton Pattern means. It’s one of the most popular design patterns, and I will show you how we are going to use it.
With this new class I am going to create, we will have a better design for our authentication functionality, and we will also make the User Model instance for the logged in user globally available in our application.
Singleton Pattern for Current User
First let’s build the skeleton:
- Create: system/application/models/current_user.php
<?php
class Current_User {
private static $user;
private function __construct() {}
public static function user() {
if(!isset(self::$user)) {
// put the User record into $this->user
// ...
}
return self::$user;
}
public function __clone() {
trigger_error('Clone is not allowed.', E_USER_ERROR);
}
}
Now let’s go over the code:
- There is a reason I called the class Current_User. Because this static class will always return an instance of the User class, for the current logged in user.
- This class does NOT extend Doctrine_Record, because we are not really creating a Doctrine Model.
- The $user variable will contain the User object for the logged in user. And we will access it by Current_User::user(). That is the syntax for calling a static class function.
- We will never create an instance of this Current_User class, so the constructor is set to private.
- We also disallow cloning of this class so the __clone() function triggers an error.
Now I’m going to add a bit more code to make this functional.
- Edit: system/application/models/current_user.php
<?php
class Current_User {
private static $user;
private function __construct() {}
public static function user() {
if(!isset(self::$user)) {
$CI =& get_instance();
$CI->load->library('session');
if (!$user_id = $CI->session->userdata('user_id')) {
return FALSE;
}
if (!$u = Doctrine::getTable('User')->find($user_id)) {
return FALSE;
}
self::$user = $u;
}
return self::$user;
}
public static function login($username, $password) {
// get User object by username
if ($u = Doctrine::getTable('User')->findOneByUsername($username)) {
// this mutates (encrypts) the input password
$u_input = new User();
$u_input->password = $password;
// password match (comparing encrypted passwords)
if ($u->password == $u_input->password) {
unset($u_input);
$CI =& get_instance();
$CI->load->library('session');
$CI->session->set_userdata('user_id',$u->id);
self::$user = $u;
return TRUE;
}
unset($u_input);
}
// login failed
return FALSE;
}
public function __clone() {
trigger_error('Clone is not allowed.', E_USER_ERROR);
}
}
Let’s go over the code in user() method first:
- The usage for this function is: Current_User::user() and it returns the User object for the logged in user.
- Line 10: We check to see if the user object is already there. If it is, we return it at line 26 .
- Lines 12-17: We load the session library, so we can read/write in the session. If the user is logged in, his id should be stored there. If we don’t see the user_id, it returns FALSE.
- We had to use the $CI object to load the session library because this is a static class.
- Lines 19-21: Fetch the User object by id. If we can’t, return FALSE. Note that we used a function named find() to look up by id.
- Lines 23 and 26: Everything went well, so we store the user object in the static variable $user and return it.
Now, when we call Current_User::user() , we can get the User object as if it’s a global variable. And if it returns false, it means the user is NOT logged in.
Let’s go over the login() method:
- I copied most of the code from the login Controller we created earlier. The code is from the authenticate() method.
- I added loading of the session library at line 42-43, so I could store the user_id in the session at line 44
- I also added line 45. Once the user gets logged in, the $user static variable is set, so it can be returned by the user() function later.
By the way, we just learned how to use Sessions in CodeIgniter. It’s not very complicated. All you need to do is to load the library and you can use the userdata() and set_userdata() function to read and write the variables. You can read more about it here.
Now we can call the static function like this: Current_User::login($username,$password) , and it will take care of the rest.
Phew! I hope that was not very complicated. But I’m sure you will soon understand why we went through all of that.
Simplified Login Controller
We are about the see the first benefit of creating all that code above.
- Edit: system/application/controllers/login.php
Only editing the authenticate() function:
<?php
class Login extends Controller {
// ...
public function authenticate() {
return Current_User::login($this->input->post('username'),
$this->input->post('password'));
}
}
See how easy that is now?
When we call Current_User::login() it attempts to login the user, and returns TRUE on success. If the login information is incorrect, it returns FALSE.
Once the user is logged in this way, we can retrieve the User object for the logged in user, anywhere in our application by simply calling Current_User::user().
Also note that we didn’t need to put “$this->load->model(‘Current_User’)” in the code, and we will never have to. The Current_User class will always be globally available in the application, because of the Doctrine autoloader that was registered in the “system/application/plugins/doctrine_pi.php” file.
Logout
Now we are going to let users logout by clicking a link. But first:
Autoloading Libraries
It seems like we are going to be using the Session Library almost everywhere in our application. Let’s have it autoloaded by CodeIgniter so we don’t have to keep calling $this->library->load(‘session’) all the time.
- Edit: system/application/config/autoload.php
Find this line:
// ...
$autoload['libraries'] = array('session');
// ...
Let’s also autoload the URL Helper.
- Edit: system/application/config/autoload.php
Find this line:
// ...
$autoload['helper'] = array('url');
// ...
Now that’s out of the way.
Logout Controller
- Create: system/application/controllers/logout.php
<?php
class Logout extends Controller {
public function index() {
$this->session->sess_destroy();
$this->load->view('logout');
}
}
We remove all of the session data by calling $this->session->sess_destroy(). Now the user will no longer be logged in.
Logout View
- Create: system/application/views/logout.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Logout</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>css/style.css"
type="text/css" media="all">
<meta http-equiv="refresh" content="3;url=<?php echo base_url(); ?>">
</head>
<body>
<div>
<p>
You are now logged out.
</p>
<p>
Redirecting you <?php echo anchor('/','home'); ?>.
</p>
</div>
</body>
</html>
This logout page will display a short message and redirect the surfer using a meta refresh.
Style Changes
I have made some css changes, so just copy paste the following:
- Edit: css/style.css
body {
font-family: "Trebuchet MS",Arial;
font-size: 14px;
background-color: #212426;
color: #B9AA81;
}
a {
color: #FFF;
}
a:hover {
color: #B9AA81;
}
input, textarea, select {
font-family:inherit;
font-size:inherit;
font-weight:inherit;
}
#signup_form {
margin-left: auto;
margin-right: auto;
width: 360px;
font-size: 16px;
}
#signup_form .heading {
text-align: center;
font-size: 22px;
font-weight: bold;
color: #B9AA81;
}
#signup_form form {
background-color: #B9AA81;
padding: 10px;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
#signup_form form label {
font-weight: bold;
color: #11151E;
}
#signup_form form input[type=text],input[type=password] {
width: 316px;
font-weight: bold;
padding: 8px;
border: 1px solid #FFF;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
#signup_form form input[type=submit] {
display: block;
margin: auto;
width: 200px;
font-size: 18px;
background-color: #FFF;
border: 1px solid #BBB;
}
#signup_form form input[type=submit]:hover {
border-color: #000;
}
#signup_form .error {
font-size: 13px;
color: #690C07;
font-style: italic;
}
Home View
Now we are going to see how easy it is to fetch user information for the logged in user.
- Create: system/application/views/home.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Home</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>css/style.css"
type="text/css" media="all">
</head>
<body>
<div>
<?php if(Current_User::user()): ?>
<h2>Hello <em><?php echo Current_User::user()->username; ?></em>.</h2>
<h2><?php echo anchor('logout','Logout'); ?></h2>
<?php else: ?>
<h2>New Users: <?php echo anchor('signup','Create an Account'); ?>.</h2>
<h2>Members: <?php echo anchor('login','Login'); ?>.</h2>
<?php endif; ?>
</div>
</body>
</html>
Home Controller
- Edit: system/application/controllers/home.php
<?php
class Home extends Controller {
public function index() {
$this->load->view('home');
}
}
That’s it!
Let’s Test It
- Go to: http://localhost/ci_doctrine/logout to make sure you are logged out.
First you will see:

And it will forward you home:

- Click the Login link to be forwarded to our Login Form.

- Enter a correct login info and you will be redirected home again.
Now you should see:

In this case my username is burak, and it was displayed back to me.
Voila!
Stay Tuned
We covered quite a few new concepts in today’s tutorial. I hope you enjoyed it and learned from it.
In the next tutorial we will explore the CRUD (Create, Read, Update and Delete) functionality with Doctrine in more detail.
See you next time!

#1 by fredquie on November 6th, 2009
| Quote
As good as ever, password should be encrypted for the sake of security…
#2 by Burak on November 6th, 2009
| Quote
It is encrypted
#3 by fredquie on November 7th, 2009
| Quote
Oh sorry, you’re the best !!!
#4 by zack on November 7th, 2009
| Quote
This really inspire me. I can’t even start to tell you how much these help.
#5 by jzigbe on November 7th, 2009
| Quote
Great Tuts!
Many Thanks.
#6 by JhonF on November 8th, 2009
| Quote
Hello everybody….
I receive this error, one time I send a form
Fatal error: Uncaught exception ‘Doctrine_Connection_Exception’ with message ‘Couldn’t locate driver named mysql’ in C:\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php:492 Stack trace: #0 C:\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection\Mysql.php(101): …….
Sorry about my english!
#7 by Burak on November 8th, 2009
| Quote
Hi,
I see you are using AppServ. I installed it to test it myself. Looks like it does not come with pdo_mysql enabled by default.
- Go to Start Menu -> Programs -> Appserv -> Configuration Server -> PHP Edit the php.ini Configuration File
- Find this line:
;extension=php_pdo_mysql.dll
- Remove the semicolon at the beginning of the line:
extension=php_pdo_mysql.dll
- Save it. And restart Appserv or Apache.
Hope that works.
#8 by Seun on September 14th, 2010
| Quote
iam getting this error on ubuntu
and the solution does not work for it
please what’s the way forward
thanks for your prompt response
#9 by Seun on September 14th, 2010
| Quote
here is where iGot a solution for this on ubuntu
http://iitdu.forumsmotion.com/tutorials-f30/introducing-codeigniter-t736.htm
open your php.ini file
goto 1099 and change it like
pdo_mysql.default_socket=/opt/lampp/var/mysql/mysql.sock
save it.
and now restart your xampp.
cheers
#10 by miguel on October 4th, 2010
| Quote
I’m using Appserver, this line does not exists in my .ini file: “;extension=php_pdo_mysql.dll”
I added it, and also changed
extension_dir = “C:/AppServ\php5\ext” by extension_dir = “C:/AppServ/php5/ext”
#11 by 光光制作 on January 11th, 2011
| Quote
HI,
I come from china , I know doctrine wnen I read your document. I have a same problem before,why 【Remove the semicolon at the beginning of the line:
extension=php_pdo_mysql.dll】 it is going to right??
#12 by JhonF on November 8th, 2009
| Quote
Perfect!!!…. Thank you so much! Great Tutorial!
#13 by Daniel on November 8th, 2009
| Quote
These tuts are amazing! Can’t wait for the next one!
#14 by shinokada on November 13th, 2009
| Quote
Question.
In function submit (), you have
$this->index();
return;
What is the difference with if I have
redirect(‘login’);
It seems like the second one does not show error as the first one. Why is it?
#15 by Burak on November 13th, 2009
| Quote
When you redirect(), the browser goes to a new url. That’s why validation_errors() in the View will not return anything, since the form validation doesn’t happen again after the redirection.
#16 by JF on November 14th, 2009
| Quote
Awesome series! Just when I got back to CodeIgniter and wanted to get more into Doctrine I find this!
Keep up the good work!
/subscribe
#17 by auke on November 19th, 2009
| Quote
Awsome tuts! thanks a lot!
I have only one, probably small issue. I do not seem to get tackled..
I get this error after loging in.
Fatal error: Uncaught exception 'Doctrine_Table_Exception' with message 'Class "CI_Base" must be a child class of Doctrine_Record' in C:\wamp\www\www.anglernotes.com\system\application\plugins\doctrine\lib\Doctrine\Table.php:310 Stack trace: #0 C:\wamp\www\www.anglernotes.com\system\application\plugins\doctrine\lib\Doctrine\Table.php(240): Doctrine_Table->initDefinition() #1 C:\wamp\www\www.anglernotes.com\system\application\plugins\doctrine\lib\Doctrine\Connection.php(1127): Doctrine_Table->__construct('Angler', Object(Doctrine_Connection_Mysql), true) #2 C:\wamp\www\www.anglernotes.com\system\application\plugins\doctrine\lib\Doctrine.php(954): Doctrine_Connection->getTable('Angler') #3 C:\wamp\www\www.anglernotes.com\system\application\models\current_angler.php(18): Doctrine::getTable('Angler') #4 C:\wamp\www\www.anglernotes.com\system\application\views\chunks\menu_header.php(4): Current_Angler::angler() #5 C:\wamp\www\www.anglernotes.com\system\libraries\Loader.php(677): include('C:\wamp\www\www...') #6 C:\wamp\www\www in C:\wamp\www\www.anglernotes.com\system\application\plugins\doctrine\lib\Doctrine\Table.php on line 310
as you can see my angler is your.... user naming....
so current_angler and Current_Angler::angler()
That should offcourse not be the problem...
Can you see what the issue is?
Code:
Thanks again for the comprehensive tutorial!
Auke.
#18 by Burak on November 19th, 2009
| Quote
I don’t see your code. Try putting it in pastebin: http://pastebin.com/ and link it here
#19 by auke on November 19th, 2009
| Quote
Sorry for that…
Here it is: http://pastebin.com/m5cd78c20
#20 by Burak on November 19th, 2009
| Quote
I meant the code, not the error message.
Anyway, I googled for that error and found only one person mentioning it. He says he had some of his models and controllers named the same, and that caused the conflict.
Hope that helps.
#21 by Saad on January 10th, 2012
| Quote
Man .. you are good. my head was about to burst as i was stuck for the last few days but i could get this thing to work but you comment saved my life …
Thanks
#22 by auke on November 19th, 2009
| Quote
Google is your friend…
i must admit i did not do a search myself… sorry for the time you had to invest.
I did manage to fix the issue partially by renaming my class. So that did the trick indeed.
I do have some issues but will try fix them myself without wasting your time
Again great read, this will surely make me adopt using doctrine.
Auke.
#23 by Pierre on December 1st, 2009
| Quote
Thanks for these nice tutorials !
I got the errror “Class ‘Current_User’ not found” when submitting form, do you know why ?
#24 by Burak on December 2nd, 2009
| Quote
Are you using Doctrine 1.2 ?
or did you set MODEL_LOADING_CONSERVATIVE ?
#25 by Kit on December 1st, 2009
| Quote
Hi, thanks for the great tutorial! One question though, after this is implemented does it mean we have to do the if (Current_User::user()) /* then display stuff */ else /*get him to login*/ for every function in our controller that requires the user to be logged in?
#26 by Burak on December 1st, 2009
| Quote
If you want an entire Controller to be “members only” , you can put that code just in the constructor, so you don’t have to put it in every single function.
#27 by kit on December 2nd, 2009
| Quote
ohh i see. thanks for the reply!
#28 by yfi on December 10th, 2009
| Quote
How about if I want to check for Current_User, redirect if not logged in. But also have the $u->Current_user::user() object available in all functions.
I put the code in the controller and i’m getting an error:
Code: http://pastebin.com/m5447ad69
When trying to access the $u object in a subsequent function i get this error:
Severity: Notice
Message: Undefined variable: u
Filename: controllers/profile.php
Line Number: 41
#29 by Burak on December 10th, 2009
| Quote
yfi,
Since $u is a class property, you need to do “$this->u = …” for assignment.
But it would be better if you just call Current_User::user() from each separate function, instead of trying to carry it over with $u.
#30 by realturk on December 2nd, 2009
| Quote
tşkler türkçe olarak yazsan bide süper olucak
#31 by Shivaas on December 6th, 2009
| Quote
One of the best tutorials I’ve seen in my time! Awesome work man. And thanks for introducing Doctrine for us beginners! You made it seemed trivial and such a breeze to use with CodeIgnitor
Keep up the good work.. The Karma is flowing towards you
#32 by haidar on December 7th, 2009
| Quote
Thank you very very much, but i have a small issue:
every time i try to log in i have the ‘Invalid’ massage
when i print the passwords i got these
- the posted password:
‘barca545′
- the encrypted posted password:
‘b597c896949f4250b06c534c3bcb28cb’
-the stored password in the database:
‘b597c896949f4250b06c’
please notice that ’534c3bcb28cb’ is append in the posted password and everything else is match well.
#33 by haidar on December 7th, 2009
| Quote
i used strpos function to make it work and i know that is not a good idea
#34 by Burak on December 7th, 2009
| Quote
b597c896949f4250b06c534c3bcb28cb is correct, it’s supposed to be 32 characters long.
What did you set the password field size in your table? 20? it needs to be at least 32.
#35 by haidar on December 8th, 2009
| Quote
yes this is the problem
thank you..
#36 by Kamil Grzegorczyk on December 9th, 2009
| Quote
I came here for nettuts. I do like stuff You are doing and I hope that I will learn much from You about doctrine.
I like that You are very consistent and “logic” – people learn about “good practices” of doing many things (not only limited to CI and Doctrine but overall)
But there is a little flaw in here
Even if it is a test view (signup_form.php) only for this tutorial we can’t make something like this:
New User Signup
You should rather use tags. I know that it is a unimportant thing but if a lot of people are reading it – it will be a good idea to keep semantic markup in mind
anyway – great stuff
#37 by Kamil Grzegorczyk on December 9th, 2009
| Quote
Ok, i can’t make html tags in here
So i would tell it other way. Instead of using p tag with class heading please use Hx tags to mark headings. It is more semantic and people are unknowingly learning proper markup.
#38 by Burak on December 9th, 2009
| Quote
You’re right, thanks for pointing that out.
#39 by Kamil Grzegorczyk on December 9th, 2009
| Quote
Anyway- Your blog is just great and I do very like that it covers not only specific part from particular tutorial, but You are always showing people how other things should be done properly.
And even If I’m here for doctrine tutorial I’m happy if I can see how You are managing some other stuff with CI (even if it isn’t main idea of tutorial) and I’m able to change my point of view on some CI aspects
#40 by cell on December 9th, 2009
| Quote
burak bey elinize sağlık süper olmuşşş
thanks for you example…
#41 by JayTee on December 9th, 2009
| Quote
Great tutorial!
I think an important item to point out is the Current_user class does NOT get autoloaded by default.
If the Doctrine plugin wasn’t autoloading everything in the app/model folder, Current_User::login() would generate an error.
#42 by Burak on December 9th, 2009
| Quote
Yeah, this is true. I plan on talking about this in an article when I talk about Conservative Loading of Models.
I didn’t wanna do $this->load->model() because it doesn’t fit well with static classes.
#43 by JayTee on December 9th, 2009
| Quote
Agreed that you won’t want to actually do $this->load->model(), I just wanted to point out that the tutorial makes a small leap when it skips the point that by creating the Current_User class and saving it in the models folder makes it globally available.
I think it might be important, even if it’s a small side note, to let the learner know that putting the new class into the models folder *and* having the Doctrine plugin on autoload is what makes the class available globally. I’ve been writing CI apps for a bit and I had to do a double take after I read that part and had forgotten about the auto-loading models of Doctrine that you mentioned in an earlier tutorial.
#44 by Burak on December 9th, 2009
| Quote
Ok, I added a note about the autoloader
#45 by james on December 18th, 2009
| Quote
Thanks for posting such a helpfull tutorial ………… can you tell me that how to get the last
inserted id from the database using doctrine
eg-> we use mysql_insert_id() in php .
#46 by Burak on December 18th, 2009
| Quote
After you do $u->save(), you can just get the id like this: $u->id
#47 by james on December 18th, 2009
| Quote
Thanks
#48 by james on December 18th, 2009
| Quote
can you give me your messanger id, so that i can chat with you for some time,,i
have lots of questions to ask from you …….Thanks
#49 by JH on October 4th, 2010
| Quote
Is it possible to get the next id before saving?
something like:
$q = Doctrine_Query::create()
->select(‘MAX(t.id)’)
->from(‘tablename t’)
->execute();
$nextid=$q->id+1;
should work, but $q->id returns 5 while my table is empty..
Any sugestions?
#50 by Anonymous on December 19th, 2009
| Quote
This is an awesome tutorial set. I turned off adblock just for you, on account of how great this is.
#51 by Matthieu Brunet on December 20th, 2009
| Quote
This is really one of the best tutorial I ever seen, and it fits perfectly my actual needs, so it’s wonderfull ! You save me a lot of time !
A little error you could fix :
At the beginning of this part, you start by creating the login view, and just after that, you ask us to test it. But we can’t, as the controller is not created yet. We can’t access http://localhost/ci_doctrine/login until we have created a minimal “login” controller.
#52 by Burak on December 20th, 2009
| Quote
Thank you, I just updated the article. Not sure why nobody else mentioned this until now.
#53 by C.J. on December 20th, 2009
| Quote
Nice tutorial.
One thing about the CurrentUser class and Singletons in PHP in general, though.
Singletons (or more generally static classes) only persist for the duration of the script, which in this case means until your HTTP Request has been processed and HTTP Response has been serverd. That means that at the start of every HTTP Request the ‘private static $user’ variable is null and needs to be set again the first time it is accessed for that particular Request.
So, if you plan to access the CurrentUser object alot, e.g. you have a “Welcome, Burak” text on your page and need to get the username from the CurrentUser object it might be better to store the entire userdata in the session instead of just the id, because otherwise you need to fetch it from your database on every single page load, which could slow down your script. You can get the actual column data from an doctrine object with the $getData method, so you might want to do something like this:
$CI->session->set_userdata(‘user’,$u->getData);
#54 by Burak on December 20th, 2009
| Quote
Yeah, that could work in this case. But storing data in the session is a slippery slope. It has limited space and the performance depends on the session handler implementation (disk files vs. memcached etc…).
Thanks for the suggestion though. I hadn’t noticed the getData function, I only knew about toArray.
#55 by C.J. on December 21st, 2009
| Quote
Yes, the session shouldn’t be exploited too much, I agree. I just wanted to point out that Singletons have a limited lifetime in PHP, unlike in, say, Java and the data needs to be refetched from the DB on every page request. So in some cases it might make more sense to store some extended data in the session instead of fetching it everytime.
#56 by Matthieu Brunet on February 11th, 2011
| Quote
I was looking into this, because I need to use ACL for my webste, and was wondering if session was a good idea or not. Google gave me an answer which seemed good ; use cache, like apc :
http://www.sitepoint.com/forums/showthread.php?t=570138
#57 by mehdy mahmood on December 24th, 2009
| Quote
Fatal error: Uncaught exception ‘Doctrine_Record_Exception’ with message ‘Unknown method User::_assign_libraries’ in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Record.php:2533 Stack trace: #0 [internal function]: Doctrine_Record->__call(‘_assign_librari…’, Array) #1 C:\wamp\www\ci_doctrine\system\libraries\Loader.php(185): User->_assign_libraries() #2 C:\wamp\www\ci_doctrine\system\libraries\Loader.php(121): CI_Loader->model(‘user’) #3 C:\wamp\www\ci_doctrine\system\libraries\Loader.php(1006): CI_Loader->model(Array) #4 C:\wamp\www\ci_doctrine\system\libraries\Controller.php(83): CI_Loader->_ci_autoloader() #5 C:\wamp\www\ci_doctrine\system\libraries\Controller.php(43): Controller->_ci_initialize() #6 C:\wamp\www\ci_doctrine\system\codeigniter\CodeIgniter.php(201): Controller->Controller() #7 C:\wamp\www\ci_doctrine\index.php(115): require_once(‘C:\wamp\www\ci_…’) #8 {main} thrown in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Record.php on line 2533
#58 by mehdy mahmood on December 24th, 2009
| Quote
Fatal error: Uncaught exception ‘Doctrine_Connection_Mysql_Exception’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ” for key ‘last_name” in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php:1084 Stack trace: #0 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection\Statement.php(253): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement)) #1 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php(1049): Doctrine_Connection_Statement->execute(Array) #2 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php(693): Doctrine_Connection->exec(‘INSERT INTO use…’, Array) #3 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection\UnitOfWork.php(595): Doctrine_Connection->insert(Object(Doctrine_Table), Array) #4 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Conne in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php on line 1084
#59 by Matthieu Brunet on December 29th, 2009
| Quote
I tried the getData() function with doctrine 1.2, and it returned me the whole Doctrine object, and not only the records.
So I tried the toArray() function, and it returned me only the records.
???
#60 by Revath S Kumar on January 4th, 2010
| Quote
nice tutorial
but one doubt
can i use some other name instead of
_submit_validate??
#61 by Marcello Romani on January 5th, 2010
| Quote
Hi,
great tutorial as always, thanks!
I would like to point out that IMHO a better way to log out the user would be to substitute:
$this->session->sess_destroy();
with:
CurrentUser::logout();
where:
class CurrentUser {
//…
public function logout() {
$CI =& get_instance();
$CI->session->sess_destroy();
}
}
The logic in this is that only the CurrentUser class needs to know how to login or logout a user, so other code need not know that the way to tell an authenticated user from another is to look at the session data.
After reading the comment about singletons in PHP, though, I understand that your code has no flaw, as I erroneously thought at first.
Thanks again for writing this tut.
#62 by Burak on January 9th, 2010
| Quote
That’s a good suggestion, thank you.
#63 by dnyce on January 5th, 2010
| Quote
Burak, is it wrong to treat the Current_User Class as an authentication library and have it include multiple functions like:
public function Change_Password() {
// Code to change our password
}
public function Reset_Password() {
// Code to reset our password
}
I’ve been studying the concept of singletons since your articles and a lot of developers seem to believe that it is a bad idea if you plan on calling upon the class/object in multiple instances? Apologies if that sounds confusing but I am still trying to wrap my head around the concept. For the time being I will proceed as such but would love to get your feedback.
#64 by Burak on January 5th, 2010
| Quote
I would put such functions inside the User model class. You can then call them like this:
Current_User::user()->reset_password();
#65 by dnyce on January 5th, 2010
| Quote
Nice,
I thought that would work as well but couldn’t for the life of me get my head around all of this. Specifically, why does the web, stack overflow, and a large portion of the development community seem to shun the idea of the Singleton Pattern? I’ve read complaints of memory leaks. Not sure if it would actually play in here.
Thanks again for these great tuts!
#66 by Burak on January 5th, 2010
| Quote
Indeed it seems like it is falling out of fashion. I really doubt that the memory leak issue applies to PHP scripts though. That is more relevant to applications that run constantly, and possibly written in C++ or Java, rather than web scripts.
Either way, I don’t claim to know and use the absolute best practices everywhere. Singletons used to be popular, but not so much anymore. Maybe it is preferred to use something like the Dependency Injection pattern instead nowadays.
I felt that in this case the Singleton pattern didn’t seem to hurt, and is simple to maintain. Some people might say it’s just another global variable in a prettier package. But at least I got some more milage out of it by adding login functionality to it.
#67 by dnyce on January 5th, 2010
| Quote
Haha well said Burak. I’ll follow your tut to the letter this time around. I agree entirely with what you have written here today.
#68 by Martuanez on January 17th, 2010
| Quote
Very useful, thanks! you should improve the printed version of the site…( i read this on my way to work)
Pingback: CodeIgniter and Doctrine from Scratch | CodeIgniter-jQuery
#69 by rmed19 on February 4th, 2010
| Quote
Hi,
great tutorial , thanks.
I have this error
?php // system/application/plugins/doctrine_pi.php // load Doctrine library require_once APPPATH.’/plugins/doctrine/lib/Doctrine.php’; // load database configuration from CodeIgniter require_once APPPATH.’/config/database.php’; // this will allow Doctrine to load Model classes automatically spl_autoload_register(array(‘Doctrine’, ‘autoload’)); // we load our database connections into Doctrine_Manager // this loop allows us to use multiple connections later on foreach ($db as $connection_name => $db_values) { // first we must convert to dsn format $dsn = $db[$connection_name]['dbdriver'] . ‘://’ . $db[$connection_name]['username'] . ‘:’ . $db[$connection_name]['password']. ‘@’ . $db[$connection_name]['hostname'] . ‘/’ . $db[$connection_name]['database']; Doctrine_Manager::connection($dsn,$connection_name); } // CodeIgniter’s Model class needs to be loaded require_once BASEPATH.’/libraries/Model.php’; // telling Doctrine where our models are located Doctrine::loadModels(APPPATH.’/models’); // (OPTIONAL) CONFIGURATION BELOW // this will allow us to use “mutators” Doctrine_Manager::getInstance()->setAttribute( Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, true); // this sets all table columns to notnull and unsigned (for ints) by default Doctrine_Manager::getInstance()->setAttribute( Doctrine::ATTR_DEFAULT_COLUMN_OPTIONS, array(‘notnull’ => true, ‘unsigned’ => true)); // set the default primary key to be named ‘id’, integer, 4 bytes Doctrine_Manager::getInstance()->setAttribute( Doctrine::ATTR_DEFAULT_IDENTIFIER_OPTIONS, array(‘name’ => ‘id’, ‘type’ => ‘integer’, ‘length’ => 4));
Fatal error: Class ‘Doctrine_Record’ not found in D:\xampp\htdocs\question\system\application\models\question.php on line 2
did u have an idea about it?
#70 by Burak on February 6th, 2010
| Quote
Is all that code in the output? Did you miss the php opening bracket or something?
#71 by Eric Kureck on February 10th, 2010
| Quote
Hi, great tutorial, but a i`m getting this message -
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information – headers already sent by (output started at C:\xampp\htdocs\ci_doctrine\system\application\config\config.php:1)
Filename: helpers/url_helper.php
Line Number: 541
thks
#72 by Burak on February 10th, 2010
| Quote
Did you accidentally put a space at the beginning of config.php ?
#73 by Eric Kureck on February 10th, 2010
| Quote
Hi, I’ve found the problem.
It was encoded as UTF-8 and when i changed to ANSI it worked fine.
Do you know why?
thanks and you tutorials are great
#74 by Ravi on February 18th, 2010
| Quote
it’s great bcz of, i’m beginer of doctrine and codeigniter
i don’t knoe how it’s work but now i have good(kind of prof.)
knowledge
#75 by Mark on February 22nd, 2010
| Quote
What do I put in a query to filter by the user’s id? It keeps erroring for me. Let’s say I have the user’s id in an orders table and want to filter a query to show the user’s orders. I want to do this using DQL and not the findby methods. Great tutorials, BTW!!! Can’t wait for Day 12.
#76 by Mark on February 23rd, 2010
| Quote
Following up on my previous question, let’s say I have a users table and an orders table and they are related. I want my query of the orders table to filter by the current user’s id. How do I do that? Everything I’ve tried errors. Basically, I want the 1 in the where clause below to be the id of the current user.
$q = Doctrine_Query::create()
->select(‘u.id, o.order_id’)
->from(‘User u’)
->leftJoin(‘u.Orders o’)
->where(‘u.id = ?’, 1);
#77 by Burak on February 24th, 2010
| Quote
If you are using the code from this tutorial, the current user id can be obtained like this:
Current_User::user()->id
#78 by Mike on March 5th, 2010
| Quote
Has anyone had an issue with loggin in on IE.
I have an application that works great on localhost in IE, however when you bring it to a live server, in my case bluehost, it does not work in IE.
I uploaded the original tutorial so you can test it yourself
http://www.mosterhout.com/ormTest
It is very strange that it works fine in mozilla but it does nothing in IE.
I hope we can figure this out, I have an application that needs to be live that is using this login system
Thanks.
#79 by Mike on March 5th, 2010
| Quote
ok probably the only thing crazier than it not working in the first place has happened.
Its now working. I am perplexed. Its gotta be something to do with the hosting, but what exactly it is, is beyond me.
Any thoughts are appreciated.
#80 by Chetane on March 21st, 2010
| Quote
I believe the issue you might be hitting is the following:
You logged in using the following url: http://www.mosterhout.com/ormTest
And accessed the page using this url: http://mosterhout.com/ormTest (without www.)
Those are considered two separate Urls, with separate sessions. (e.g. log in using the first url, and go to the second and notice you are not logged in)
#81 by Mike on March 21st, 2010
| Quote
I am not sure what you mean by “And accessed the page using this url: http://mosterhout.com/ormTest ”
I am getting an error if I log in from either http://www.mosterhout.com/ormTest or http://mosterhout.com/ormTest
This is quite possibly the most annoying IE issue I have seen, but then again they all feel that way. I have still not found a fix for this.
#82 by Mike on March 21st, 2010
| Quote
just tested again and it appears that if the first thing you do upon entering the site is log in it will let you.
If you then log out, it will not let you log back in.
So now we have some consistency to the problem. Question is, how do you fix it?
#83 by Mike on April 28th, 2010
| Quote
I think I finally have a fix for this issue, and it is very simple. I removed the www. from the base_url in config.php.
I have no idea why this works, but the comment below this was on the right track.
#84 by francois on March 15th, 2010
| Quote
Hello !
Yo asked yourself about how to do more simple to test if the user is logged without creating a new User and using mutatos.
In doctrine docs a Founded :
$user = $userTable->findOneByUsernameAndPassWord(‘jownage’, md5(‘changeme’));
great no ?
#85 by David on March 18th, 2010
| Quote
Here’s a solution to your doctrine mutator problem (for the password encrypting):
use hasAccessor!
#86 by Chetane on March 21st, 2010
| Quote
When you create “public function authenticate()”, this is basically creating a new controller. Maybe this method should be private?
#87 by Chetane on March 21st, 2010
| Quote
Just tried it, seems like it doesn’t work as private considering the call is from a different context (CI_Form_validation). Yet the public option represents a security hole, as anyone could target this controller with post data for user/pass and the extra validation would be bypassed (e.g. length requirements).
#88 by Burak on March 21st, 2010
| Quote
It wouldn’t really do anything unless they have a valid login info. I’m not seeing a glaring security hole here.
#89 by Chetane on March 21st, 2010
| Quote
I agree with you, it is not a critical issue in this case. Yet, it opens the door to bypass validations that were set beforehand… from that perspective it is an issue.
I modified it slightly as follows:
function signin() { define(‘IS_SIGNING_IN’, true);
function Authenticate() { if(!defined(‘IS_SIGNING_IN’)) exit (‘No direct script access allowed’);
On a side note, your tutorials are AMAZING
I started learning about Code Igniter and Doctrine today and really like it so far, thanks to you. Also, I refactored the Current_User within the User class as follows: http://pastebin.com/ZGy3q3N3. Do you think this a good approach or it’s rather bad practice?
#90 by Burak on March 21st, 2010
| Quote
I think your version looks good.
#91 by reynald Reyes on March 21st, 2010
| Quote
A PHP Error was encountered
Severity: Warning
Message: PDO::__construct() [pdo.--construct]: [2002] Invalid argument (trying to connect via unix://)
Filename: Doctrine/Connection.php
Line Number: 476
Fatal error: Uncaught exception ‘Doctrine_Connection_Exception’ with message ‘PDO Connection Error: SQLSTATE[HY000] [2002] Invalid argument’ in /opt/lampp/htdocs/cdd-oaasys/system/application/plugins/doctrine/lib/Doctrine/Connection.php:480 Stack trace: #0 /opt/lampp/htdocs/cdd-oaasys/system/application/plugins/doctrine/lib/Doctrine/Connection/Mysql.php(101): Doctrine_Connection->connect() #1 /opt/lampp/htdocs/cdd-oaasys/system/application/plugins/doctrine/lib/Doctrine/Connection.php(1008): Doctrine_Connection_Mysql->connect() #2 /opt/lampp/htdocs/cdd-oaasys/system/application/plugins/doctrine/lib/Doctrine/Query/Abstract.php(1094): Doctrine_Connection->execute(‘SELECT u.id AS …’, Array) #3 /opt/lampp/htdocs/cdd-oaasys/system/application/plugins/doctrine/lib/Doctrine/Query/Abstract.php(1142): Doctrine_Query_Abstract->_execute(Array) #4 /opt/lampp/htdocs/cdd-oaasys/system/application/controllers/login.php(85): Doctrine_Query_Abstract->execute() #5 /opt/lampp/htdocs/cdd-oaasys/system/libraries/Form_validation.php(589): Log in /opt/lampp/htdocs/cdd-oaasys/system/application/plugins/doctrine/lib/Doctrine/Connection.php on line 480
#92 by reynald Reyes on March 21st, 2010
| Quote
Please help me to solve this isseue,.thankx
#93 by reynald Reyes on March 21st, 2010
| Quote
Im already resolved the issue.. (breath)
#94 by Sofian on March 28th, 2010
| Quote
Hi again, i’m still tuning with your tutorial and Thank’s for Greate Tutorial.
Please correct my code at http://sofian.pastebin.com/VMhTYaLm
There’s problem with the login. When I input not existing username or empty password the Error message appear,
BUT when i input the existing username with WRONG PASSWORD the program redirect to home file. As if it were TRUE
I think the password checking is not right. Something wrong on it.
Please help me
Thank u
#95 by Sofian on March 28th, 2010
| Quote
SOLVED !!!
my mistake on user.php
$this->_set(‘password’,md5($salt,$value));
should be :
$this->_set(‘password’,md5($salt . $value));
comma
#96 by Raf on March 30th, 2010
| Quote
hi, The tutorial is great. However, I came to a problem when I try to test the user login. I get no errors but the function is taking me to the page to re-enter the user login details saying the the submitted info was not correct.
“Invalid login. Please try again.” is the message I get when I enter the correct user name and password.
I checked the match of the two encrypted passwords and they both match together. So I tried to test the whether the;
if ($u = Doctrine::getTable(‘User’)->findOneByUsername($username)){
…
echo ‘test’;
}
and it seems that this test message does not run, meaning there is a problem with the if statement, either the Doctrine function is not working properly. I changed findOneBy to findByUsername and it seems to enter into the if statement and printed test.
Do you know any idea?
#97 by Raf on March 30th, 2010
| Quote
I found the problem. It was a small mistake on the userlogin form . I have corrected that and it seems to pass the value of the username, previously the username was not passed with the correct value.
#98 by Ibrahim on April 2nd, 2010
| Quote
Thank you so much Burak. I so benefits from your tuts
#99 by Angela on April 2nd, 2010
| Quote
Thank you for the tutorial! I think I’m learning a lot from these. Wish there were more.
I am getting an error message though, when I try to create a user (it is called character in my app):
Fatal error: Uncaught exception ‘Doctrine_Table_Exception’ with message ‘Class “CI_Base” must be a child class of Doctrine_Record’ in C:\xampp\htdocs\legion\system\application\plugins\doctrine\lib\Doctrine\Table.php:319 Stack trace: #0 C:\xampp\htdocs\legion\system\application\plugins\doctrine\lib\Doctrine\Table.php(256): Doctrine_Table->initDefinition() #1 C:\xampp\htdocs\legion\system\application\plugins\doctrine\lib\Doctrine\Connection.php(1126): Doctrine_Table->__construct(‘Characters’, Object(Doctrine_Connection_Mysql), true) #2 C:\xampp\htdocs\legion\system\application\plugins\doctrine\lib\Doctrine\Core.php(1095): Doctrine_Connection->getTable(‘Characters’) #3 C:\xampp\htdocs\legion\system\application\libraries\MY_Form_validation.php(16): Doctrine_Core::getTable(‘Characters’) #4 C:\xampp\htdocs\legion\system\libraries\Form_validation.php(630): MY_Form_validation->unique(‘test’, ‘Characters.name’) #5 C:\xampp\htdocs\legion\system\libraries\Form_validation.php(337): CI_Form_validation->_execute(Array, Array, ‘test’) # in C:\xampp\htdocs\legion\system\application\plugins\doctrine\lib\Doctrine\Table.php on line 319
#100 by fahri firdausillah on April 8th, 2010
| Quote
Thanks for your tutorial, it’s very great for me. I use CI several times, but never user Doctrine especially combined with CI. Your tuts is very inspiring me.
But i have one problem here, in one of my project i have to use multiple databases. With CI i can use multiple db config to do that, or i can just use $this->db->query(“…”) to access table in other database (in case my mysql user have privilleges to access both database). I don’t know how to do the same things in Doctrine.
- Can i use multiple db config in Doctrine (especially combined with CI)?
- can i use plain Sql Query in Doctrine to access multiple database?
Thanks for the answer, and i will much happy if there are any tuts showing the sample…..
#101 by Haqqi on April 17th, 2010
| Quote
I’m new in PHP and CI.
If u use static variable of user, will it be shared among each user? I mean, if the application is for multi-user, will the data in static variable be shared? For example, when another user has been logged in, and then i want to log in too, is the data replaced?
#102 by Steve on April 19th, 2010
| Quote
Hi Burak,
I’m trying to create a ‘users’ controller which will contain all protected content for logged in users. I’m trying to use the singleton to do a check to see if the user is logged in in the __construct function like so:
class Users extends Controller {
function __construct() {
if(Current_User::user()) {
$this->index();
} else {
redirect(‘login’);
}
}
When I do that, however, I get: Fatal error: Class ‘Current_User’ not found in… etc. I thought the Current_User class was autoloaded? The file current_user.php is inside of my models directory… Any idea how I can resolve this?
Much thanks!
#103 by Steve on April 19th, 2010
| Quote
Bah… forgot parent::Controller() …. also, the code should be if(!Current_User::user()) { redirect(‘login’); , otherwise I ended up getting index() twice…
Anyhow, thanks for an excellent tutorial, sir! I did have one other more relevant question: Just to test security, I logged in correctly to my users controller, then copied the url, logged out, and tried to access the users area with the url I’d pasted. As hoped for, I was redirected to my login controller and a blank login form. Suppose I want to pass an error message which says something to the effect of ‘You are not currently logged in!’ when that happens. What’s the best way to achieve something like this?
Thanks again!
#104 by Mitesh Tandel on April 20th, 2010
| Quote
Hello Burak,
I have followed all lines of code. But when I logged in using right username & password, It doesn’t logged in and asked me again with one notice as follows,
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: user_id
Filename: models/current_user.php
Line Number: 16
can you help me pls?
Thanks.
#105 by Myrna on April 30th, 2010
| Quote
Hello Burak,
To log into a database using the username and password. But I want to change the username to be id_name. What code should be replaced in login.php in the controller, login_view, and user.php in the model?
Sorry with my english ..
I need your explanation because I am still new in using the CI.
Thanks.
#106 by smartypants on May 15th, 2010
| Quote
Type your comment here
It’s not. ;P It is hashed. Hashing != Encryption.
#107 by laanes on May 18th, 2010
| Quote
If i click on login it loads up this page:
http://localhost/index.php/localhost/index.php/login/submit
and if i click on create new account it takes me here:
http://localhost/index.php/localhost/index.php/signup
Why does it return localhost/index.php 2 times in the url
Im confused
Hope anyone knows what the issue might be
#108 by iain on May 24th, 2010
| Quote
@laanes – did you copy the htaccess file correctly? that may be the problem.
#109 by Mathias on May 25th, 2010
| Quote
Hello,
Thanks a lot for your work and your explications.
I have a probleme vith the login function. I can loggin but dont write session.
I have try to set a session in an user page, it’s ok, but not when I called login function.
If someone can help me, it will be great.
Thanks
#110 by enogeze on June 29th, 2010
| Quote
Hi Burak.
Thanks for these tutorials. I’m having trouble understanding the use of the Singleton pattern here.
The first use of current_user.php is a call to static function login() in authenticate() in login.php as follows…
return Current_User::login($this->input->post(‘username’),$this->input->post(‘password’));
This static login() method “sets” the value of self::$user.
From reading about Singleton I understand that the Current_User needs to be instantiated once, from a call to a static method, to create an instance of self::user. The Singleton class Current_User, would be set up in such a way that any future calls to this same static function would simply return the same static property self::user.
So my question is, how can the static property self::user be set when an instance of it hasn’t been created yet.
Thanks for your help.
#111 by enogeze on July 1st, 2010
| Quote
Hi again.
I now understand that because self::user is static it does NOT need to be instantiated.
Is it true to say that the Current_User class is “singleton-like” but is not really an example of the singleton pattern?
In the singleton pattern a static public function is called that should instantiate a single instance of the class if this hasn’t been done already. Otherwise it returns the existing instance. This would give access to any non-static properties in the single instance that are created on its instantiation.
In Current_User, the Current_User class is never instantiated. It doesn’t need to be as it has no non-static properties. Would it be fair to say that Current_User is really just a static class and not an example of the singleton pattern?
Thanks again for your great tutorials.
#112 by matt on July 12th, 2010
| Quote
Hello Burak,
Tremendous tutorial!
I was just wondering if you could point me in the right direction as to how to implement users with different privilege levels ie, users with privilege level 1 get sent to one page, users with privilege level 2 get sent to another page, and both can only see their respective pages.
Many thanks,
Matt
#113 by Nick on July 25th, 2010
| Quote
Thanks so much for these, they’re the best CI tutorials I have seen!
#114 by Aravind on August 13th, 2010
| Quote
Super Cool !!!!! Thanks a lot for posting !
#115 by hello hello on August 26th, 2010
| Quote
Hi burak, great tutorials. likes likes
I am going through your tutorials and i encountered with following error which I couldn’t fix.
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information – headers already sent by (output started at C:\xampp\htdocs\tutorial\system\application\models\user.php:1)
Filename: codeigniter/Common.php
Line Number: 360
404 Page Not Found
The page you requested was not found.
#116 by hello hello on August 26th, 2010
| Quote
Still this error is not solved..
A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information – headers already sent by (output started at C:\xampp\htdocs\tutorial\system\application\libraries\MY_Form_validation.php:2)
Filename: helpers/url_helper.php
Line Number: 541
#117 by ybico on September 19th, 2010
| Quote
Excellent tutorial!!
I just started 2 days ago using CI and I should say that is very easy to understand it. I’m glad that I found out about it. I think, CI helps to understand the french framework symfony, with more ease, as well.
I’ll keep going up to the end of these tuts.
#118 by JH on October 4th, 2010
| Quote
Type your comment here
found my solution, i hope this is the correct way to do it, but it works..
$q = Doctrine_Query::create()
->select(‘MAX(t.id) AS maxid’)
->from(‘table t’)
->fetchArray();
$nextid=$q[0]['maxid']+1;
Greetz.
#119 by Aulia on October 18th, 2010
| Quote
Hi, I’m new in CI and doctrine, i learned by following this great tutorials.
I followed every code from above, about session..
The session is okay when i run it with IE but when I try to run it in Firefox, the session is failed, i mean, I still can access home even I’ve logged out
Can I get a solution about this?
Thanks
#120 by Shaughn on October 21st, 2010
| Quote
Your tutorials are awesome. I’ve learned more about MVC programming here than any book or site! God bless.
P.S. Please publish a book on CodeIgniter 2.0
#121 by Raymundo Valdez on October 25th, 2010
| Quote
Why didn’t you wrote a book on CodeIgniter? This is what CI has been missing in the literary department.
Just a question: should you use the destructor instead of ‘unset’ with $u_input?
#122 by Chandana Bandara on November 7th, 2010
| Quote
Thank you very much for your tutorial. It is very helpful for newbies. Keep up the good work.
#123 by caraxes on November 18th, 2010
| Quote
Hi ! Grate tut !

In index function in login controller you can add small security update so if user is logged in he can’t login twice
$CI =& get_instance();
$CI->load->library(‘session’);
if(isset($CI->session->userdata['user_id'])) redirect(‘/home’);
else $this->load->view(‘login_form’);
Regards, caraxes
#124 by Hardik on December 1st, 2010
| Quote
Hi…….
This is the grate for beginners.
thanks
#125 by Balazs Bohonyi on January 25th, 2011
| Quote
The authenticate() method from the login controller is available via the browser – so I can access it like this: http://localhost/ci_doctrine/login/authenticate. I think this might be a security issue. One way to fix it is to rename it to _authenticate() and in the form validation use it with the following callback: callback__authenticate.
I tried to make the method protected, but an error pops up. I assume that making it private won’t work either.
#126 by shinee on March 3rd, 2011
| Quote
in this login is there an option to send mail to user if he forgot this password?
#127 by shai on March 4th, 2011
| Quote
I installed this login and doctrine 2 and ci2 i get this masseges:
Message: Undefined variable: db
Filename: libraries/Doctrine.php
Fatal error: Call to undefined method Doctrine::getTable() in C:\wamp\www\site\isetall\application\libraries\MY_Form_validation.php on line 16
please help
#128 by Roy on April 15th, 2011
| Quote
when ever i press the login button it just freeze and a dialog box will appear saying that the apache http server is not responding.. whats happening here?? also when i add the authentication for username and email the same thing happen.
#129 by Addisruriprok on April 23rd, 2011
| Quote
=
#130 by karen on June 27th, 2011
| Quote
Hi can i know yr login page when user login, does it save in phpmyadmin?
#131 by Andre on July 9th, 2011
| Quote
First of all, thanks to Burak for this amazing series of tutorials! Took a lot of work, I bet. I’m amazed at your willingness to help others.
It’s July 10, 2011 and Doctrine is now version 2.0 (stable) and CodeIgniter is version 2.0.2 (stable).
After a several hours of fighting, I’ve got this tutorial working from the beginning up to Day 4 using the current CodeIgniter 2.0.2 but with the archived Doctrine 1.2 (stable) (v1.2.4 I believe). I’m running MAMP.
If you have any questions, just reply here and I’ll try to help.
There are working sources for CodeIgniter2+Doctrine2 but the tutorial does not translate over easily without some more tweaking. Due to lack of time, I’m just going to keep going and maybe try later.
#132 by Annasuper on July 20th, 2011
| Quote
Hosting is made elbow at hand the ISP server resources.
Staid solely saying is that the “reservation” / putting at the disposal of
circumscribed sum total of the burdensome disk (almost always INCURSION)
greatest amount of facts to be sent by the server Internet connections
services supported close the server leeway (in the range depending on the specific services, such as access to the database, specifying the climactic size)
uttermost bit by bit of server load next to the service.
Oftentimes on tap resources are determined one by one from natural construction of the server room.
From the vantage point of providers of such services consist mainly of caring in compensation a permanent, proper management of drives and the server family to the Internet. A probity supplier should be solicitous down:
well-behaved ready both drives and other components inescapable looking for the fit functioning of the server
substantial condition Internet interrelationship,
security of data on customers and their accounts – both against leakage ilk copying of documents from the desktop as warm-heartedly as electronic stealing,
care also in behalf of servers, and on them in front the several types of accounts with the aid the Internet attacks,
up to top and rapid, persevering availability of stored resources on the Internet.
Hosting
Typically, the hosting serving pro renting a policy in place of HTTP servers is called network hosting.
On the Internet you can ascertain free hosting services. Hosting such a can include a horde of limitations:
limitations associated with the maximum monthly transport, disk seat,
need of access to databases,
no shore up in support of scripting languages (eg PHP)
and also:
ads on the summon forth posted by the supplier,
acquire advertising messages electronically.
#133 by veasna on August 1st, 2011
| Quote
i was copy it and it correct thank you
#134 by Rami on August 20th, 2011
| Quote
Great tutorial ! Thanks
Don’t stop please
#135 by Titus on September 20th, 2011
| Quote
great tutorial !very simple and strait forward,thanks a lot.
#136 by софт в сети, фильмы, скачать бесплатно, без регистрации, музыка, варез, игры, warez on October 4th, 2011
| Quote
Лучший софт в сети интернет
Trackback: everything about java
#137 by zahid on October 27th, 2011
| Quote
you are awesome…. keep it up i found your tutorials so so helpful..
#138 by noob on November 28th, 2011
| Quote
hi, I would like to ask, on how could I get the maxid, and then use it for the id of the next record.
I have this :
Model:
$this->db->select_max(‘id’);
$query = $this->db->get(‘users’);
return $query->result();
Controller:
$this->load->model(‘crudModel’);
$maxId= $this->crudModel->maxid();
$maxId2=$maxId++;
but it is not working, as according to the error, it returns an array… how should I fix this? many thanks to your tutorial and your help!
#139 by sam on November 28th, 2011
| Quote
Hi,
I am trying this tutorial in codeigniter 2.x + doctrine 2.x. Setup seems to work fine as mentioned “http://www.tlswebsolutions.com/codeigniter-2-and-doctrine-2-integration-a-working-setup-doctrineignited/”. But I can’t get any further.
1st of all how can i access Current_User::login from my controller. It says class Current_User not found.
Thanks for any help.
#140 by Saad on December 2nd, 2011
| Quote
I have tried to run this tutorial with HMVC module – Its working but login validation is working only to the point if you dont enter username or passord/both but its not working when i type wrong username…
I would really like some comments on it.
Thanks
Saad
Trackback: polinesian noni
Trackback: Игры денди онлайн
Trackback: [admission requirements|associate degree nursing program|bridge program|content bridge|educational mobility|nurse program|physical therapist assistant|practical nurse|registered nurse]
Pingback: CodeIgniter and Doctrine from scratch. | 世界是平的
#141 by Straw_Hat on March 4th, 2012
| Quote
Hello Burak
…. i’ve a question…. it’s obvious after we logged out we can’t back into the home.php which have a logout link… here’s the script
Hello username;?>
New Users :
Members :
i supposed after logged out the php script will not showing the first condition but showing the second condition cause sess has been destroyed… but why its still showing the first condition?? I need your help… you have my regards… thank you
this is a veryyyy nice tutorial ^^b
Trackback: онлайн в хорошем качестве
Trackback: how many calories in a grapefruit
Trackback: Wellington places to stay
Trackback: tts
#142 by television sets on April 15th, 2012
| Quote
Hello Guru, what entice that you post a commentary? Nice Blog
#143 by Rudolf on November 3rd, 2012
| Quote
Asking questions are actually pleasant thing if you are not understanding anything totally, but this
article presents good understanding yet.
#144 by typehuse prisliste on January 15th, 2013
| Quote
I am not sure where you are getting your info, but good topic.
I needs to spend some time learning much more or understanding more.
Thanks for fantastic info I was looking for this info for my mission.
#145 by http://tinyurl.com/jp2slions52875 on January 16th, 2013
| Quote
“CodeIgniter and Doctrine from scratch Day 4 – User
Login | PHP and Stuff” was definitely engaging and enlightening!
In todays universe that’s challenging to carry out.
Thx, Florence
#146 by chatten op msn on February 16th, 2013
| Quote
chatten met vreemden mensen
#147 by Bakhtiar wazir on February 21st, 2013
| Quote
hi;
very helpful and nice code.
thnx
Bakhtiar wazir
#148 by wuvhaznpye on April 9th, 2013
| Quote
kccwvqiqboetuvgg, rkagnpooka
#149 by polos ralph lauren on April 12th, 2013
| Quote
{
{I will|I am going to|I’m going to|I may} {come back|return|revisit} {once again|yet again} {since I|since i have} {bookmarked|book marked|book-marked|saved as a favorite} it. Money and freedom {is the best|is the greatest} way to change, may you be rich and continue to {help|guide} {other people|others}.|
{I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It’s|It is} pretty
worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a
lot more} useful than ever before.|
I {couldn’t|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I’ll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your
{rss|rss feed} as I {can not|can’t} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you’ve} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may
just|may|could} subscribe. Thanks.|
{It is|It’s} {appropriate|perfect|the best} time to make some plans for the future and {it is|it’s} time to
be happy. {I have|I’ve} read this post and if I could I {want to|wish to|desire to} suggest you {few|some} interesting things or {advice|suggestions|tips}. {Perhaps|Maybe} you {could|can} write next articles referring to this article. I {want to|wish to|desire to} read {more|even more} things about it!|
{It is|It’s} {appropriate|perfect|the best} time to make {a few|some} plans for {the future|the longer term|the long run}
and {it is|it’s} time to be happy. {I have|I’ve} {read|learn} this {post|submit|publish|put up} and
if I {may just|may|could} I {want to|wish to|desire to} {suggest|recommend|counsel} you {few|some} {interesting|fascinating|attention-grabbing} {things|issues} or {advice|suggestions|tips}.
{Perhaps|Maybe} you {could|can} write {next|subsequent} articles {relating to|referring to|regarding} this article.
I {want to|wish to|desire to} {read|learn} {more|even more}
{things|issues} {approximately|about} it!|
{I have|I’ve} been {surfing|browsing} {online|on-line} {more than|greater than} {three|3} hours {these days|nowadays|today|lately|as of late}, {yet|but} I {never|by no means} {found|discovered} any {interesting|fascinating|attention-grabbing} article like yours. {It’s|It is} {lovely|pretty|beautiful} {worth|value|price} {enough|sufficient} for me.
{In my opinion|Personally|In my view}, if
all {webmasters|site owners|website owners|web owners} and bloggers made {just right|good|excellent} {content|content material} as {you did|you probably did}, the {internet|net|web} {will be|shall
be|might be|will probably be|can be|will likely be} {much
more|a lot more} {useful|helpful} than ever before.|
Ahaa, its {nice|pleasant|good|fastidious} {discussion|conversation|dialogue} {regarding|concerning|about|on the topic of} this {article|post|piece of writing|paragraph}
{here|at this place} at this {blog|weblog|webpage|website|web site}, I have read all
that, so {now|at this time} me also commenting {here|at this
place}.|
I am sure this {article|post|piece of writing|paragraph} has touched all the internet {users|people|viewers|visitors}, its really really
{nice|pleasant|good|fastidious} {article|post|piece of writing|paragraph} on building up new {blog|weblog|webpage|website|web site}.
|
Wow, this {article|post|piece of writing|paragraph} is {nice|pleasant|good|fastidious},
my {sister|younger sister} is analyzing {such|these|these kinds of} things,
{so|thus|therefore} I am going to {tell|inform|let know|convey} her.
|
{Saved as a favorite|bookmarked!!}, {I really like|I like|I love} {your blog|your
site|your web site|your website}!|
Way cool! Some {very|extremely} valid points! I appreciate you {writing this|penning
this} {article|post|write-up} {and the|and also the|plus the} rest
of the {site is|website is} {also very|extremely|very|also really|really} good.
|
Hi, {I do believe|I do think} {this is an excellent|this is
a great} {blog|website|web site|site}. I stumbledupon it
Woah! I’m really {loving|enjoying|digging} the template/theme of this {site|website|blog}.
It’s simple, yet effective. A lot of times it’s {very hard|very difficult|challenging|tough|difficult|hard} to get that “perfect balance”
between {superb usability|user friendliness|usability} and {visual appearance|visual appeal|appearance}.
I must say {that you’ve|you have|you’ve} done a {awesome|amazing|very good|superb|fantastic|excellent|great} job
with this. {In addition|Additionally|Also}, the
blog loads {very|extremely|super} {fast|quick} for
me on {Safari|Internet explorer|Chrome|Opera|Firefox}.
{Superb|Exceptional|Outstanding|Excellent} Blog!
|
These are {really|actually|in fact|truly|genuinely} {great|enormous|impressive|wonderful|fantastic} ideas
in {regarding|concerning|about|on the topic of} blogging.
You have touched some {nice|pleasant|good|fastidious} {points|factors|things} here.
Any way keep up wrinting.|
{I love|I really like|I enjoy|I like|Everyone loves} what you guys {are|are
usually|tend to be} up too. {This sort of|This type
of|Such|This kind of} clever work and {exposure|coverage|reporting}!
Keep up the {superb|terrific|very good|great|good|awesome|fantastic|excellent|amazing|wonderful} works guys I’ve {incorporated||added|included} you guys to {|my|our||my personal|my own} blogroll.|
{Howdy|Hi there|Hey there|Hi|Hello|Hey}! Someone in my {Myspace|Facebook} group shared this {site|website} with us so I came to {give it a look|look it over|take a look|check it out}. I’m definitely {enjoying|loving} the information.
I’m {book-marking|bookmarking} and will be tweeting this to my followers! {Terrific|Wonderful|Great|Fantastic|Outstanding|Exceptional|Superb|Excellent} blog and {wonderful|terrific|brilliant|amazing|great|excellent|fantastic|outstanding|superb} {style and design|design and style|design}.|
{I love|I really like|I enjoy|I like|Everyone loves} what you guys {are|are usually|tend to be} up too. {This sort of|This type of|Such|This kind of} clever work and {exposure|coverage|reporting}! Keep up the {superb|terrific|very good|great|good|awesome|fantastic|excellent|amazing|wonderful} works guys I’ve {incorporated|added|included} you guys to
{|my|our|my personal|my own} blogroll.|
{Howdy|Hi there|Hey there|Hi|Hello|Hey} would you mind {stating|sharing} which blog platform you’re {working with|using}? I’m {looking|planning|going} to start my own blog {in the near future|soon} but
I’m having a {tough|difficult|hard} time {making a decision|selecting|choosing|deciding} between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your {design and style|design|layout} seems different then most blogs and I’m looking for something {completely unique|unique}.
P.S {My apologies|Apologies|Sorry} for {getting|being} off-topic but I had to ask!
|
{Howdy|Hi there|Hi|Hey there|Hello|Hey} would you mind letting me know which {webhost|hosting company|web host} you’re {utilizing|working with|using}? I’ve loaded your blog in 3 {completely different|different} {internet browsers|web browsers|browsers} and I must say this blog loads a lot {quicker|faster} then most.
Can you {suggest|recommend} a good {internet hosting|web hosting|hosting} provider at a {honest|reasonable|fair} price?
{Thanks a lot|Kudos|Cheers|Thank you|Many thanks|Thanks}, I appreciate it!
|
{I love|I really like|I like|Everyone loves} it {when people|when individuals|when folks|whenever people} {come
together|get together} and share {opinions|thoughts|views|ideas}.
Great {blog|website|site}, {keep it up|continue the good work|stick
with it}!|
Thank you for the {auspicious|good} writeup. It in fact was
a amusement account it. Look advanced to {far|more} added agreeable from you!
{By the way|However}, how {can|could} we communicate?|
{Howdy|Hi there|Hey there|Hello|Hey} just wanted to give you a quick
heads up. The {text|words} in your {content|post|article}
seem to be running off the screen in {Ie|Internet explorer|Chrome|Firefox|Safari|Opera}.
I’m not sure if this is a {format|formatting} issue or something to do with {web browser|internet browser|browser} compatibility but I {thought|figured} I’d
post to let you know. The {style and design|design and style|layout|design} look great though!
Hope you get the {problem|issue} {solved|resolved|fixed} soon.
{Kudos|Cheers|Many thanks|Thanks}|
This is a topic {that is|that’s|which is} {close to|near to} my heart… {Cheers|Many thanks|Best wishes|Take care|Thank you}! {Where|Exactly where} are your contact details though?|
It’s very {easy|simple|trouble-free|straightforward|effortless}
to find out any {topic|matter} on {net|web} as compared to {books|textbooks}, as I found this {article|post|piece of writing|paragraph} at this {website|web site|site|web page}.
|
Does your {site|website|blog} have a contact page? I’m having {a tough time|problems|trouble} locating it but, I’d like to {send|shoot} you an {e-mail|email}.
I’ve got some {creative ideas|recommendations|suggestions|ideas} for your blog you might be interested in hearing. Either way, great {site|website|blog} and I look forward to seeing it {develop|improve|expand|grow} over time.|
{Hola|Hey there|Hi|Hello|Greetings}! I’ve been {following|reading} your {site|web
site|website|weblog|blog} for {a long time|a while|some time}
now and finally got the {bravery|courage} to go ahead and give you a shout out from {New Caney|Kingwood|Huffman|Porter|Houston|Dallas|Austin|Lubbock|Humble|Atascocita} {Tx|Texas}!
Just wanted to {tell you|mention|say} keep up the {fantastic|excellent|great|good} {job|work}!
|
Greetings from {Idaho|Carolina|Ohio|Colorado|Florida|Los angeles|California}!
I’m {bored to tears|bored to death|bored} at work so I decided to {check out|browse} your {site|website|blog} on my iphone during lunch break. I {enjoy|really like|love} the {knowledge|info|information} you {present|provide} here and can’t wait
And, if you are {posting|writing} {on|at} {other|additional} {sites|social sites|online sites|online social sites|places}, {I’d|I would} like to {follow|keep up with} {you|{anything|everything} {new|fresh} you have to post}. {Could|Would} you {list|make a list} {all|every one|the complete urls} of {your|all your} {social|communal|community|public|shared} {pages|sites} like your {twitter feed, Facebook page or linkedin profile|linkedin profile, Facebook page or twitter feed|Facebook page, twitter feed, or linkedin profile}?|
to take a look when I get home. I’m {shocked|amazed|surprised} at how {quick|fast} your blog loaded on my {mobile|cell phone|phone} .. I’m not even using WIFI, just 3G
.. {Anyhow|Anyways}, {awesome|amazing|very good|superb|good|wonderful|fantastic|excellent|great} {site|blog}!
|
Its {like you|such as you} {read|learn} my {mind|thoughts}!
You {seem|appear} {to understand|to know|to grasp} {so much|a lot} {approximately|about} this,
{like you|such as you} wrote the {book|e-book|guide|ebook|e book} in it or
something. {I think|I feel|I believe} {that you|that you simply|that you just} {could|can}
do with {some|a few} {%|p.c.|percent} to {force|pressure|drive|power} the message {house|home} {a bit|a little bit}, {however|but} {other than|instead of} that, {this is|that is} {great|wonderful|fantastic|magnificent|excellent} blog. {A great|An excellent|A fantastic} read. {I’ll|I will} {definitely|certainly} be back.|
I visited {multiple|many|several|various} {websites|sites|web sites|web pages|blogs} {but|except|however} the audio {quality|feature} for audio songs {current|present|existing} at this {website|web site|site|web page} is {really|actually|in fact|truly|genuinely} {marvelous|wonderful|excellent|fabulous|superb}.|
{Howdy|Hi there|Hi|Hello}, i read your blog {occasionally|from time to time} and i own a similar one and i was just {wondering|curious} if you get a lot of spam {comments|responses|feedback|remarks}? If so how do you {prevent|reduce|stop|protect against} it, any plugin or anything you can {advise|suggest|recommend}? I get so much lately it’s driving me {mad|insane|crazy} so any {assistance|help|support} is very much appreciated.|
Greetings! {Very helpful|Very useful} advice {within this|in this particular} {article|post}! {It is the|It’s the} little changes {that make|which will make|that produce|that will make} {the biggest|the largest|the greatest|the most important|the most significant} changes. {Thanks a lot|Thanks|Many thanks} for sharing!|
{I really|I truly|I seriously|I absolutely} love {your blog|your site|your website}.. {Very nice|Excellent|Pleasant|Great} colors & theme. Did you {create|develop|make|build} {this website|this site|this web site|this amazing site} yourself? Please reply back as I’m {looking to|trying to|planning to|wanting to|hoping to|attempting to} create {my own|my very own|my own personal} {blog|website|site} and {would like to|want to|would love to} {know|learn|find out} where you got this from or {what the|exactly what the|just what the} theme {is called|is named}. {Thanks|Many thanks|Thank you|Cheers|Appreciate it|Kudos}!|
{Hi there|Hello there|Howdy}! This {post|article|blog post} {couldn’t|could not} be written {any better|much better}! {Reading through|Looking at|Going through|Looking through} this {post|article} reminds me of my previous roommate! He {always|constantly|continually} kept {talking about|preaching about} this. {I will|I’ll|I am going to|I most certainly will} {forward|send} {this article|this information|this post} to him. {Pretty sure|Fairly certain} {he will|he’ll|he’s going to} {have a good|have a very good|have a great} read. {Thank you for|Thanks for|Many thanks for|I appreciate you for} sharing!|
{Wow|Whoa|Incredible|Amazing}! This blog looks {exactly|just} like my old one! It’s on a {completely|entirely|totally} different {topic|subject} but it has pretty much the same {layout|page layout} and design. {Excellent|Wonderful|Great|Outstanding|Superb} choice of colors!|
{There is|There’s} {definately|certainly} {a lot to|a great deal to} {know about|learn about|find out about} this {subject|topic|issue}. {I like|I love|I really like} {all the|all of the} points {you made|you’ve made|you have made}.|
{You made|You’ve made|You have made} some {decent|good|really good} points there. I {looked|checked} {on the internet|on the web|on the net} {for more info|for more information|to find out more|to learn more|for additional information} about the issue and found {most individuals|most people} will go along with your views on {this website|this site|this web site}.|
{Hi|Hello|Hi there|What’s up}, I {log on to|check|read} your {new stuff|blogs|blog} {regularly|like every week|daily|on a regular basis}. Your {story-telling|writing|humoristic} style is {awesome|witty}, keep {doing what you’re doing|up the good work|it up}!|
I {simply|just} {could not|couldn’t} {leave|depart|go away} your {site|web site|website} {prior to|before} suggesting that I {really|extremely|actually} {enjoyed|loved} {the standard|the usual} {information|info} {a person|an individual} {supply|provide} {for your|on your|in your|to your} {visitors|guests}? Is {going to|gonna} be {back|again} {frequently|regularly|incessantly|steadily|ceaselessly|often|continuously} {in order to|to} {check up on|check out|inspect|investigate cross-check} new posts|
{I wanted|I needed|I want to|I need to} to thank you for this {great|excellent|fantastic|wonderful|good|very good} read!! I {definitely|certainly|absolutely} {enjoyed|loved} every {little bit of|bit of} it. {I have|I’ve got|I have got} you {bookmarked|book marked|book-marked|saved as a favorite} {to check out|to look at} new {stuff you|things you} post…|
{Hi|Hello|Hi there|What’s up}, just wanted to {mention|say|tell you}, I {enjoyed|liked|loved} this {article|post|blog post}. It was {inspiring|funny|practical|helpful}. Keep on posting!|
I {{leave|drop|{write|create}} a {comment|leave a response}|drop a {comment|leave a response}|{comment|leave a response}} {each time|when|whenever} I {appreciate|like|especially enjoy} a {post|article} on a {site|{blog|website}|site|website} or {I have|if I have} something to {add|contribute|valuable to contribute} {to the discussion|to the conversation}. {It is|Usually it is|Usually it’s|It’s} {a result of|triggered by|caused by} the {passion|fire|sincerness} {communicated|displayed} in the {post|article} I {read|looked at|browsed}. And {on|after} this {post|article} CodeIgniter and Doctrine from scratch Day 4 – User Login | PHP and Stuff. I {{was|was actually} moved|{was|was actually} excited} enough to {drop|{leave|drop|{write|create}}|post} a {thought|{comment|{comment|leave a response}a response}} {:-P|:)|;)|;-)|:-)} I {do have|actually do have} {{some|a few} questions|a couple of questions|2 questions} for you {if you {don’t|do not|usually do not|tend not to} mind|if it’s {allright|okay}}. {Is it|Could it be} {just|only|simply} me or {do|does it {seem|appear|give the impression|look|look as if|look like} like} {some|a few} of {the|these} {comments|responses|remarks} {look|appear|come across} {like they are|as if they are|like} {coming from|written by|left by} brain dead {people|visitors|folks|individuals}?
{Hi there|Hello}, I enjoy reading {all of|through} your {article|post|article post}. I {like|wanted} to write a little comment to support you.|
I {always|constantly|every time} spent my half an hour to read this {blog|weblog|webpage|website|web site}’s {articles|posts|articles or reviews|content} {everyday|daily|every day|all the time} along with a {cup|mug} of coffee.|
I {always|for all time|all the time|constantly|every time} emailed this {blog|weblog|webpage|website|web site} post page to all my {friends|associates|contacts}, {because|since|as|for the reason that} if like to read it {then|after that|next|afterward} my {friends|links|contacts} will too.|
My {coder|programmer|developer} is trying to {persuade|convince} me to move to .net from PHP. I have always disliked the idea because of the {expenses|costs}. But he’s tryiong none the less. I’ve been using {Movable-type|WordPress} on {a number of|a variety of|numerous|several|various} websites for about a year and am {nervous|anxious|worried|concerned} about switching to another platform. I have heard {fantastic|very good|excellent|great|good} things about blogengine.net. Is there a way I can {transfer|import} all my wordpress {content|posts} into it? {Any kind of|Any} help would be {really|greatly} appreciated!|
{Hello|Hi|Hello there|Hi there|Howdy|Good day}! I could have sworn I’ve {been to|visited} {this blog|this web site|this website|this site|your blog} before but after {browsing through|going through|looking at} {some of the|a few of the|many of the} {posts|articles} I realized it’s new to me. {Anyways|Anyhow|Nonetheless|Regardless}, I’m {definitely|certainly} {happy|pleased|delighted} {I found|I discovered|I came across|I stumbled upon} it and I’ll be {bookmarking|book-marking} it and checking back {frequently|regularly|often}!|
{Terrific|Great|Wonderful} {article|work}! {This is|That is} {the type of|the kind of} {information|info} {that are meant to|that are supposed to|that should} be shared {around the|across the} {web|internet|net}. {Disgrace|Shame} on {the {seek|search} engines|Google} for {now not|not|no longer} positioning this {post|submit|publish|put up} {upper|higher}! Come on over and {talk over with|discuss with|seek advice from|visit|consult with} my {site|web site|website} . {Thank you|Thanks} =)|
Heya {i’m|i am} for the first time here. I {came across|found} this board and I find It {truly|really} useful & it helped me out {a lot|much}. I hope to give something back and {help|aid} others like you {helped|aided} me.|
{Hi|Hello|Hi there|Hello there|Howdy|Greetings}, {I think|I believe|I do believe|I do think|There’s no doubt that} {your site|your website|your web site|your blog} {might be|may be|could be|could possibly be} having {browser|internet browser|web browser} compatibility {issues|problems}. {When I|Whenever I} {look at your|take a look at your} {website|web site|site|blog} in Safari, it looks fine {but when|however when|however, if|however, when} opening in {Internet Explorer|IE|I.E.}, {it has|it’s got} some overlapping issues. {I just|I simply|I merely} wanted to {give you a|provide you with a} quick heads up! {Other than that|Apart from that|Besides that|Aside from that}, {fantastic|wonderful|great|excellent} {blog|website|site}!|
{A person|Someone|Somebody} {necessarily|essentially} {lend a hand|help|assist} to make {seriously|critically|significantly|severely} {articles|posts} {I would|I might|I’d} state. {This is|That is} the {first|very first} time I frequented your {web page|website page} and {to this point|so far|thus far|up to now}? I {amazed|surprised} with the {research|analysis} you made to {create|make} {this actual|this particular} {post|submit|publish|put up} {incredible|amazing|extraordinary}. {Great|Wonderful|Fantastic|Magnificent|Excellent} {task|process|activity|job}!|
Heya {i’m|i am} for {the primary|the first} time here. I {came across|found} this board and I {in finding|find|to find} It {truly|really} {useful|helpful} & it helped me out {a lot|much}. {I am hoping|I hope|I’m hoping} {to give|to offer|to provide|to present} {something|one thing} {back|again} and {help|aid} others {like you|such as you} {helped|aided} me.|
{Hello|Hi|Hello there|Hi there|Howdy|Good day|Hey there}! {I just|I simply} {would like to|want to|wish to} {give you a|offer you a} {huge|big} thumbs up {for the|for your} {great|excellent} {info|information} {you have|you’ve got|you have got} {here|right here} on this post. {I will be|I’ll be|I am} {coming back to|returning to} {your blog|your site|your website|your web site} for more soon.|
I {always|all the time|every time} used to {read|study} {article|post|piece of writing|paragraph} in news papers but now as I am a user of {internet|web|net} {so|thus|therefore} from now I am using net for {articles|posts|articles or reviews|content}, thanks to web.|
Your {way|method|means|mode} of {describing|explaining|telling} {everything|all|the whole thing} in this {article|post|piece of writing|paragraph} is {really|actually|in fact|truly|genuinely} {nice|pleasant|good|fastidious}, {all|every one} {can|be able to|be capable of} {easily|without difficulty|effortlessly|simply} {understand|know|be aware of} it, Thanks a lot.|
{Hi|Hello} there, {I found|I discovered} your {blog|website|web site|site} {by means of|via|by the use of|by way of} Google {at the same time as|whilst|even as|while} {searching for|looking for} a {similar|comparable|related} {topic|matter|subject}, your {site|web site|website} {got here|came} up, it {looks|appears|seems|seems to be|appears to be like} {good|great}. {I have|I’ve} bookmarked it in my google bookmarks.
{Hello|Hi} there, {simply|just} {turned into|became|was|become|changed into} {aware of|alert to} your {blog|weblog} {thru|through|via} Google, {and found|and located} that {it is|it’s} {really|truly} informative. {I’m|I am} {gonna|going to} {watch out|be careful} for brussels. {I will|I’ll} {appreciate|be grateful} {if you|should you|when you|in the event you|in case you|for those who|if you happen to} {continue|proceed} this {in future}. {A lot of|Lots of|Many|Numerous} {other folks|folks|other people|people} {will be|shall be|might be|will probably be|can be|will likely be} benefited {from your|out of your} writing. Cheers!|
{I am|I’m} curious to find out what blog {system|platform} {you have been|you happen to be|you are|you’re} {working with|utilizing|using}? I’m {experiencing|having} some {minor|small} security {problems|issues} with my latest {site|website|blog} and {I would|I’d} like to find something more {safe|risk-free|safeguarded|secure}. Do you have any {solutions|suggestions|recommendations}?|
{I am|I’m} {extremely|really} impressed with your writing skills {and also|as well as} with the layout on your {blog|weblog}. Is this a paid theme or did you {customize|modify} it yourself? {Either way|Anyway} keep up the {nice|excellent} quality writing, {it’s|it is} rare to see a {nice|great} blog like this one {these days|nowadays|today}.|
{I am|I’m} {extremely|really} {inspired|impressed} {with your|together with your|along with your} writing {talents|skills|abilities} {and also|as {smartly|well|neatly} as} with the {layout|format|structure} {for your|on your|in your|to your} {blog|weblog}. {Is this|Is that this} a paid {subject|topic|subject matter|theme} or did you {customize|modify} it {yourself|your self}? {Either way|Anyway} {stay|keep} up the {nice|excellent} {quality|high quality} writing, {it’s|it is} {rare|uncommon} {to peer|to see|to look} a {nice|great} {blog|weblog} like this one {these days|nowadays|today}..|
{Hi|Hello}, Neat post. {There is|There’s} {a problem|an issue} {with your|together with your|along with your} {site|web site|website} in {internet|web} explorer, {may|might|could|would} {check|test} this? IE {still|nonetheless} is the {marketplace|market} {leader|chief} and {a large|a good|a big|a huge} {part of|section of|component to|portion of|component of|element of} {other folks|folks|other people|people} will {leave out|omit|miss|pass over} your {great|wonderful|fantastic|magnificent|excellent} writing {due to|because of} this problem.|
{I’m|I am} not sure where {you are|you’re} getting your {info|information}, but {good|great} topic. I needs to spend some time learning {more|much more} or understanding more. Thanks for {great|wonderful|fantastic|magnificent|excellent} {information|info} I was looking for this {information|info} for my mission.|
{Hi|Hello}, i think that i saw you visited my {blog|weblog|website|web site|site} {so|thus} i came to “return the favor”.{I am|I’m} {trying to|attempting to} find things to {improve|enhance} my {website|site|web site}!I suppose its ok to use {some of|a few of} your ideas!!\
#150 by софт on April 17th, 2013
| Quote
I am regular visitor, how are you everybody? This paragraph posted at this website is truly pleasant.
#151 by http://www.meizitangcapsule.com/2012-red-meizitang-msv-p-42.html on April 17th, 2013
| Quote
STAY AWAY FROM NICOTINE OR CAFFEINE, especially during the 1st few weeks, then the capsule will actually function, confident.
#152 by karen millen stores on April 17th, 2013
| Quote
They are some sort of symbols of chastity and virginity.
An identical color principle is relevant to both other sorts of clothing
and summer time dresses. I do believe every woman
has one, it is her buddy. Among the list of biggest changes which includes occurred in the entire suit is
the type of pants. http://www.karenmilenshop.
co.uk/
#153 by step stool on April 22nd, 2013
| Quote
Very nice post. I just stumbled upon your weblog and wished to say that I have truly enjoyed browsing
your blog posts. After all I’ll be subscribing to your feed and I hope you write again soon!
#154 by accredited online college degree Programs on May 14th, 2013
| Quote
Currently it appears like Drupal is the top blogging platform out there right now.
(from what I’ve read) Is that what you are using on your blog?
#155 by The next best way to learn a foreign language other than living in the native country. Use these methods to learn french, learn german, learn italian, learn portuguese, or learn spanish. on May 16th, 2013
| Quote
I simply could not depart your website before suggesting that I really loved the usual information an individual provide in your visitors? Is gonna be again incessantly in order to check up on new posts
#156 by bunk beds with desk on May 17th, 2013
| Quote
I am in fact thankful to the owner of this website who has shared this wonderful paragraph
at here.
#157 by http://romans.yourbb.nl on May 23rd, 2013
| Quote
It’s truly a nice and helpful piece of information. I am happy that you shared this useful information with us. Please stay us informed like this. Thanks for sharing.