Part of the EllisLab Network
   
18 of 36
18
FreakAuth_light authentication library/admin application released!
Posted: 28 February 2007 11:49 AM   [ Ignore ]   [ # 266 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  208
Joined  06-12-2006
codelearn - 28 February 2007 11:41 AM

Ztinger:The problem persists!

Well, I had the exact same problem that you yesterday and resolved that way.

Profile
 
 
Posted: 28 February 2007 11:57 AM   [ Ignore ]   [ # 267 ]  
Summer Student
Total Posts:  4
Joined  02-28-2007

ztinger,

Your fix didn’t fix my install of freakauth.

PHP 4.4.3

FreakAuth 1.0.2 Beta

CI 1.5.2


Error:
Fatal error: Call to a member function on a non-object in /home/xxx/public_html/system/application/libraries/Freakauth_light.php on line 1196

Url:

http://my-site.com/admin/users/add.html

Profile
 
 
Posted: 28 February 2007 12:34 PM   [ Ignore ]   [ # 268 ]  
Summer Student
Total Posts:  4
Joined  02-28-2007

I think I’ve got it now…

(in \system\application\libraries\Freakauth_light.php)

replace all instances

$this->CI->load->model('Userprofile', 'userprofile');


with

$this->CI->load->model('Userprofile');

then

replace all instances

>CI->userprofile


with

>CI->Userprofile

*Notice capital U in Userprofile

Then, put ztinger’s code in auth.php and admin/admins.php

For example: line 46 or so in admin/admins.php

$this->lang->load('freakauth');
        
$this->load->model('FreakAuth_light/usermodel', 'usermodel');
         
$this->load->model('Userprofile');  // <--- Add this line
        
$this->load->library('validation');

Profile
 
 
Posted: 28 February 2007 01:00 PM   [ Ignore ]   [ # 269 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  277
Joined  02-07-2007

Capital U or not - it shouldn’t matter, because the second parameter when loading the model, is reassigning its name.

Example:

$this->load->model('Usermodel');

Will be used like this:

$this->Usermodel->somefunction();

BUT when it is loaded like this:

$this->load->model('Usermodel', 'usermodel');

It will be used like this:

$this->usermodel->somefunction();

So, either way you did it, it shouldn’t have caused any errors - the error messages usually tell you all you need to know though…

Profile
 
 
Posted: 28 February 2007 01:11 PM   [ Ignore ]   [ # 270 ]  
Summer Student
Total Posts:  4
Joined  02-28-2007

Iksander you are right, and at the same time I have to disagree, in practice.

What you’ve said is accurate, BUT, I had an error with FAL using on a server running php 4+.  I made the changes I outlined and the problems went away.

If it helps the author tweak his code, or someone else resolve the issue, then great.

But I needed the problem fixed, and those are the steps I took.  Whether my changes *should* matter or not is moot. 

But on an academic level, I already knew, and agree with what you’ve posted.

Profile
 
 
Posted: 28 February 2007 01:34 PM   [ Ignore ]   [ # 271 ]  
Grad Student
Avatar
Rank
Total Posts:  94
Joined  03-05-2006

Gotta chime in with Oldcity on this one: I’ve done the same, getting rid of the multiple model load and initial upper-casing the references to the model throughout (as per the CI user guide), and it fixed all my problems. Well, my freakauth related ones anyway…

Also it got rid of the need to load the model in the constructor. Be great if this could be in the next release, Dan..?

I’m using PHP4.4.4 as well : you lucky PHP5 people don’t have the same problem, I checked by flipping between the two in MAMP.

Profile
 
 
Posted: 28 February 2007 01:43 PM   [ Ignore ]   [ # 272 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

I’m planning a release at the beginning of next week fixing this PHP4 issue, Iksander, grahack and wolfear layout fixes, and some other minor stuff.

...I’ve just been on CI SWIFT MAILER today: did you check it out?

+ another candy for CI lovers will come soon: stay tuned!

tongue wink

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 28 February 2007 02:12 PM   [ Ignore ]   [ # 273 ]  
Summer Student
Total Posts:  4
Joined  02-28-2007

By the way, a small typo at site/admin/users/add

passoword:

should be password:


And I just have to say, excellent, excellent job with this complex script.

Profile
 
 
Posted: 28 February 2007 03:08 PM   [ Ignore ]   [ # 274 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

I’ll try to do my best!

Just please don’t blame me I’ll forget to correct some typos!

sick

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 28 February 2007 04:18 PM   [ Ignore ]   [ # 275 ]  
Summer Student
Total Posts:  17
Joined  11-14-2006

first i have to thank for the errorfixing (1139/1196)
i guess i have another issue:
i used another prefix for my tables (not ci_ or fa_) -> i used ktr_ for some reasons
the first thing was that the installer didnt recognizes that - so i simply executed the original sql file
in my database. than it works
internally it uses my tables (with ktr_)

that should be fixed

Profile
 
 
Posted: 28 February 2007 04:23 PM   [ Ignore ]   [ # 276 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

Did you change the prefix of ci_sessions to ktr_session?

I hard coded ci_sessions (instead of $this->config->item(‘sess_table_name’ ) at line 81 of installer.php)

I’ll fix it.

Dan

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 28 February 2007 04:27 PM   [ Ignore ]   [ # 277 ]  
Summer Student
Total Posts:  17
Joined  11-14-2006

Next one: wink
In the FreakAuth Administration Console could be a list for all “users” with a new field for the role.
I added an “Editor” and it only appears in the database… but not in any list.

so you could simplify your controllers (isnt users.php similar like admin.php ??)

Profile
 
 
Posted: 28 February 2007 04:35 PM   [ Ignore ]   [ # 278 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

The role field it’s already there in version 1.0.2-BETA.

If you log in as ‘superadmin’ you should be able to see all roles, while if you log in as admin, you should see all roles but ‘superadmin’ and ‘admin’.

Don’t you have it?

alexpetri - 28 February 2007 04:27 PM

so you could simplify your controllers (isnt users.php similar like admin.php ??)

I agree, but this ‘doubling’ keeps things more tidy.
If you like you can merge them.

Dan

 Signature 

FreakAuth_light: pluggable & extendable authentication library that works on CI 1.5.X

CI SWIFT MAILER: 44% less memory than PHPMailer at double speed

Using Zend Framework components in Code Igniter

Profile
 
 
Posted: 28 February 2007 08:41 PM   [ Ignore ]   [ # 279 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  277
Joined  02-07-2007

@oldcity: I didn’t mean to sound assertive about what should be right or wrong (I know it came off that way). My original intent with the post was to more or less question why that would solve the problem… as it seems odd to me that it would solve it (like you said, it is a moot point as it is fixed…).

Trivial…

Profile
 
 
Posted: 01 March 2007 06:56 AM   [ Ignore ]   [ # 280 ]  
Summer Student
Total Posts:  17
Joined  11-14-2006

I have a question about integrating freakauth in my application
its a normal html site with (simplified) 2 columns (content and sidebar)

i want to have the loginbox in the sidebar on every page/controller
but i dont know how to implement that. can anyone give me a hint to do that?

Profile
 
 
   
18 of 36
18
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66425 Total Logged-in Users: 34
Total Topics: 84784 Total Anonymous Users: 1
Total Replies: 454963 Total Guests: 227
Total Posts: 539747    
Members ( View Memberlist )
Newest Members:  csaturkeytherendStudioGeorgiaJZeerfedegheEdgedcenticeRoger_Mxcamilojoostvaningen