Part of the EllisLab Network
   
19 of 36
19
FreakAuth_light authentication library/admin application released!
Posted: 01 March 2007 07:06 AM   [ Ignore ]   [ # 281 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

There is an helper for this:

in your view (or in the controller assigning it to a variable) use the displayLoginForm() helper (it’s in application/helpers/freakauth_light_helper.php)

<?=displayLoginForm()?>

 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: 01 March 2007 07:13 AM   [ Ignore ]   [ # 282 ]  
Summer Student
Total Posts:  17
Joined  11-14-2006

thx for the hint. but it passes only an array:

/**
     * Gets login form input values.
     *
     * @return array
     */
    
function getLoginForm()
    
{
        $values[
'user_name'] = $this->CI->input->post('user_name');
        
$values['password'] = $this->CI->input->post('password');
        
        
//$values[$this->CI->config->item('FAL_<your field>_field')] = $this->CI->input->post($this->CI->config->item('FAL_<your field>_field'));
        
        
return $values;
    
}

Profile
 
 
Posted: 01 March 2007 07:20 AM   [ Ignore ]   [ # 283 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  492
Joined  02-21-2007

Hi guys,

I needed to fetch the user_name of another user than the one connected.
Found nothing simple in the model.

I did this trick in the helper, but I’m sure that there is a better way.

function getUserProperty($id, $prop)
{
    $obj
=& get_instance();
    
$obj->lang->load('freakauth');
    
$obj->load->model('usermodel');
    
$query = $obj->usermodel->getUserById($id);
    if (
$query->num_rows() == 1)
    
{
        $row
= $query->row();
        if (isset(
$row->$prop)) return $row->$prop;
        else return
'<h1>unknown prop, please check the columns in table '.$obj->config->item('FAL_table_prefix').'user</h1>';
    
}
    
else return $obj->lang->line('FAL_unknown_user');
}


Ideas ?

Dan, what do you think about starting a new thread for the next release ?
This one is huge.
Forget my idea if you want to break the highest score.

Profile
 
 
Posted: 01 March 2007 07:28 AM   [ Ignore ]   [ # 284 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

@alexpetri
Cool…. we found another small thing to implement!

Try to change that helper function in application/helpers/freakauth_light_helper.php to:

function displayLoginForm()
{
    $obj
=& get_instance();
    
$obj->lang->load('freakauth');
    return
$obj->load->view($obj->config->item('FAL_login_view'));
}

Maybe you will need to duplicate the login form view in order to work properly for your needs.

Dan

[EDIT] this is a temporary solution(not sure it works): I’ll fix this in next release

 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: 01 March 2007 08:35 AM   [ Ignore ]   [ # 285 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  492
Joined  02-21-2007
danfreak - 01 March 2007 07:28 AM

function displayLoginForm()
{
    $obj
=& get_instance();
    
$obj->lang->load('freakauth');
    return
$obj->load->view($obj->config->item('FAL_login_view'));
}

don’t we need the second parameter (true) here for $obj->load->view() ; ?

Profile
 
 
Posted: 01 March 2007 08:35 AM   [ Ignore ]   [ # 286 ]  
Summer Student
Total Posts:  17
Joined  11-14-2006

okay that works.
now its time to rewrite the whole auth controller to fit my purposes

Profile
 
 
Posted: 01 March 2007 08:40 AM   [ Ignore ]   [ # 287 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
grahack - 01 March 2007 08:35 AM
danfreak - 01 March 2007 07:28 AM

function displayLoginForm()
{
    $obj
=& get_instance();
    
$obj->lang->load('freakauth');
    return
$obj->load->view($obj->config->item('FAL_login_view'));
}

don’t we need the second parameter (true) here for $obj->load->view() ; ?

If you use it directlly in the VIEW NO

if you use it in a controller and you pass it to the VIEW assigning it to a variable YES

 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: 01 March 2007 12:20 PM   [ Ignore ]   [ # 288 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  277
Joined  02-07-2007

@alex: if I am understanding correctly - you are over complicating it… All you need to do is build a login form (two input boxes, one text other psswrd, and a submit button) that submits to the auth.php script (you can put this login box in a fragment view that loads as your sidebar). In your auth.php script if you go down to the _login() function, and look for where the views and $data[‘page’] is being loaded and set, you can simply adjust them to redirect for your needs.

Hope that helps ya!

Profile
 
 
Posted: 02 March 2007 01:01 AM   [ Ignore ]   [ # 289 ]  
Summer Student
Total Posts:  28
Joined  11-23-2006

Good Day!

First of all FAL is really promising!

I’m currently developing on a localhost my box has no capability to send email for activation. so i used the add user function in the admin panel but it seems that it is not working?

Profile
 
 
Posted: 02 March 2007 03:08 AM   [ Ignore ]   [ # 290 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006
garri - 02 March 2007 01:01 AM

Good Day!

First of all FAL is really promising!

I’m currently developing on a localhost my box has no capability to send email for activation. so i used the add user function in the admin panel but it seems that it is not working?

I guess you are running PHP4. If Yesyou have 2 solutions to sort out your problem:

a) turn custom user_profile OFF in the application/config/freakauth_light.php

b) have a look to what the gang suggested in this forum @page 18

I hope this helps!

PS: to enable mailing in your localhost on Wondows open your php.ini file and find the below stuff and change it to suit your internet provider smtp config

[mail function]
; For Win32 only.
SMTP = smtp.tiscali.it
smtp_port
= 25

 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: 02 March 2007 08:04 PM   [ Ignore ]   [ # 291 ]  
Summer Student
Total Posts:  1
Joined  03-02-2007

How can I remember the password and login so the user can log on automatically?

Profile
 
 
Posted: 02 March 2007 10:54 PM   [ Ignore ]   [ # 292 ]  
Lab Assistant
RankRank
Total Posts:  240
Joined  11-10-2006

there’s a thing about it that i don’t like ... don’t know if anyone else has complained yet and honestly i’m too lazy to read 20 pages smile

Part of the Documentation:
NB: just comma separated WITHOUT SPACES
RIGHT—> ‘user,admin’
WRONG—> ‘user, admin’

i haven’t looked at your code but i imagine you just explode it ... if so, just do something like

$groups = explode($param);
foreach(
$groups as $group) $group = trim($group);

-> improved usability with just one line of code wink

cheers

 Signature 

blog

Profile
 
 
Posted: 03 March 2007 05:25 AM   [ Ignore ]   [ # 293 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  512
Joined  12-05-2006

Good suggestion Clemens!

Will be in next release!

Dan

Clemens - 02 March 2007 10:54 PM

-> improved usability with just one line of code wink

cheers


Sometime, as you can understand, when I concentrate in new code additions, I’ll look in functionality and testing it, so I can miss some detail like in this case: this is the case in which your contributions, like Clemens one, come in great!

 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: 05 March 2007 12:19 PM   [ Ignore ]   [ # 294 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  173
Joined  02-25-2007

I am getting this error when I try to go to the forgotten password or register pages:

Fatal error: Call to undefined function imagettftext() in /mnt/w0703/d14/s24/b028dad5/www/smashedcampus.com/SmashedCI/system/libraries/Image_lib.php on line 1077

Profile
 
 
Posted: 05 March 2007 12:36 PM   [ Ignore ]   [ # 295 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  492
Joined  02-21-2007

You need GD and FreeType installed in your PHP installation.
Are you sure they are ?

Profile
 
 
   
19 of 36
19
 
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: 64453 Total Logged-in Users: 21
Total Topics: 80961 Total Anonymous Users: 0
Total Replies: 435696 Total Guests: 192
Total Posts: 516657    
Members ( View Memberlist )