flexi auth - A user authentication library for CodeIgniter |
[eluser]haseydesign[/eluser]
@NotSmilie Well as the error states, your error in the SQL is caused by an undefined var on line 310 of flexi_auth_model.php which is: Code: $sql_update[$this->auth->tbl_col_user_account[$key]] = $user_data[$column]; To work out which var is undefined, just try outputting each var to track down which var is undefined. Example: Code: var_dump($this->auth->tbl_col_user_account[$key]); This should at least give you a new set of clues.
[eluser]haseydesign[/eluser]
@ReyPM Its hard for me to speculate what the problem is going to be between your two servers. What is the code on your version of flexi_auth_model.php @ 1770? Other steps you could try out. + If you have access to any other servers, try and see for demo purposes as to whether the site works on the other server. + Install a bare minimum example of the flexi auth library on the server, you can try the flexi auth demo if that helps. Let us know if you find the problem.
[eluser]NotSmilie[/eluser]
The null value appears to be Code: $config['database']['user_acc']['custom_columns'] = array( string 'user_accounts.uacc_group_fk' (length=27) string '1' (length=1) string 'user_accounts.uacc_email' (length=24) string '[email protected]' (length=13) string 'user_accounts.uacc_username' (length=27) string 'Test' (length=4) null string '5' (length=1) null here, is the column name of the credits. I just copy pasted your work, assuming it would work based on the example in the config file?
[eluser]Unknown[/eluser]
@haseydesign First of all congratz for the great plugin! I'm learning through your demo and implementing it on my site, and I guess I found an issue at line 336 of demo_auth_model.php: the primary key should be the correspondent upro_uacc_fk of the $user_id, and not the $user_id itself. In my case I just used my own model in order to retrieve the correspondet pk and it works fine. Anyway, congratulations for the excellent work.
[eluser]Swedie[/eluser]
In flexi_auth_model on line 927: return $this->db->where($this->auth->tbl_col_user_account['username'], $username) ->count_all_results($this->auth->tbl_user_account) == 0; This function returns a bolean false if the username is not following A-Z only. I accidentally had a ? (question mark). So it returns a bolean false, not a 0 (result count) vaue. btw, I am calling this model outside of the demo admin area and the $this->flexi_auth_model->status_messages('public', FALSE, FALSE) function returns nothing.
[eluser]haseydesign[/eluser]
@NotSmilie There was a bug in the library from a recent change preventing the custom columns to be updated. You can get the changes by pulling the latest library files form the Github repo. The files you will need are the flexi_auth_model.php and flexi_auth_lite_model.php files. ------------------------------------------------------------------------------------------------------------------------ @tiagows and @Swedie Thanks for your bug reports, I'm short on time at the moment, but I'll try get around to looking at them soon.
[eluser]GeWeDo[/eluser]
Hi All First of all thanx to haseydesign for such a nice plugin for user login. I installed flexi auth demo on my online website & it works fine. But I have problem on localhost. I want to customize it & for that I need to work on localhost. I have following settings: local host with CI + XAMPP + Windows 7 Directory structure: http://localhost/xampp/prj/pub <- Here I have index.php & .htaccess file http://localhost/xampp/prj/main/system <- This is CI System folder http://localhost/xampp/prj/main/application <- This is CI Application folder My .htaccess file is: IndexIgnore * RewriteEngine On RewriteBase /prj/pub/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php [L,QSA] I use http://localhost/xampp/prj/pub to access the flexi auth demo & it opens main page. But when i click "Try the Demo" it takes me to xampp default web root i.e. http://localhost/xampp & shows directory listing of this folder. I have been checking by changing base path & different .htaccess during last 2 days but no success. At present I have set my base url : http://localhost/xampp/prj/pub/ in auth_lite.php file. Can anybody help me ? Regards
[eluser]haseydesign[/eluser]
@GetWebDom I've not personally tried to run a CI installation outside of the standard structure: Code: /application/ Whilst excluding the flexi-auth library from this test, have you been able to get a minimal site example setup with the folder configuration you are trying? For example - a basic 'Hello World' type page with something more complex like a database request on the same page? If not, then you need to ensure that CI and its own native libraries are setup with a different folder structure. If this does then continue to run into trouble, how essential is it that you structure you folders differently?
[eluser]GeWeDo[/eluser]
@haseydesign Of-course I tried & tested this structure & it works. Moreover this same structure works fine at my online server.
[eluser]senli[/eluser]
I had the similar problem. Error Number: 1364 Field 'uacc_forgotten_password_expire' doesn't have a default value INSERT INTO `user_accounts` (`user_accounts`.`uacc_group_fk`, `user_accounts`.`uacc_email`, `user_accounts`.`uacc_username`, `user_accounts`.`uacc_password`, `user_accounts`.`uacc_ip_address`, `user_accounts`.`uacc_date_last_login`, `user_accounts`.`uacc_date_added`, `user_accounts`.`uacc_activation_token`, `user_accounts`.`uacc_active`, `user_accounts`.`uacc_suspend`, `user_accounts`.`uacc_salt`) VALUES (1, '[email protected]', 's44li', '$2a$08$Y.wP8VWekaVXLHscI175qeW73G1M34/KdHpS7i5tYsDayB7r0jJaa', '127.0.0.1', '2013-03-31 23:42:42', '2013-03-31 23:42:42', 'dbc58d051aaa745b390830f97bd323e318638870', 0, 0, 'zF9NNPdCVS') Filename: C:\server\Apache Software Foundation\Apache2.2\ci\system\database\DB_driver.php Line Number: 330 ------------------------------------------------------------------------------- [quote author="haseydesign" date="1362658349"]@taztwister I'm not convinced the NOT NULL condition set in the MySQL table is the cause of the error you are getting. I use the same SQL you are using and when I insert a record, MySQL simply enters an empty string (Equivalent to '') rather than NULL and this works fine for me and other users. The NOT NULL setting is just a personal preference, if you want to allow NULL, then give it a go and see whether it solves your problem as I don't think it should affect the functionality of the library. Additionally, you could try defining MySQL to enter an empty string for the column. Code: ALTER TABLE `user_accounts` If one of these methods do work, then maybe its conflict with the MySQL version you are using - do you know what version you're on?[/quote] |
Welcome Guest, Not a member yet? Register Sign In |