ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Ion Auth - Lightweight Auth System based on Redux Auth 2

February 10, 2010 7:00pm

Subscribe [287]
  • #526 / Aug 20, 2010 6:10pm

    jondavidjohn

    5 posts

    figured as much.

    I’m looking for more of an administrative password reset.

    Should I just formulate it using hash_password() and manually update the database?

    If there is a way to do it within the ion_auth framework I’d like to do that before I try and brute force it.

  • #527 / Aug 20, 2010 6:18pm

    jsherk

    12 posts

    Did you look at the forgotten_password() and forgotten_password_completed() functions?

  • #528 / Aug 20, 2010 11:23pm

    Rolly1971

    144 posts

    the password reset works the same for admins and regular members alike. the admin can use the regular members password reset form/functions. if you want a stand alone setup for the admin look at the template forms that come with ion auth.

  • #529 / Aug 21, 2010 12:09am

    jondavidjohn

    5 posts

    I understand that, my purpose was to have it set up where the admin did not have to know the users password to reset it.

  • #530 / Aug 21, 2010 12:50am

    Rolly1971

    144 posts

    just follow how the users password reset is done and duplicate that for the admin.

  • #531 / Aug 21, 2010 4:44am

    This is really Nice work.

  • #532 / Aug 22, 2010 9:18am

    ZabelInGruen

    1 posts

    Hi all,

    I’m quite new to Codeigniter and tried to implement this Ion Auth in my upcoming project.
    Thanks in advance Ben for your great work.

    I experience some problems using Ion Auth with the example controller.
    When I try to login, I end up in an endless loop producing:

    “/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth../login”
    until I stop the script execution.

    Maybe helpful to know that I have to use kind of multi sites installation.

    Means I have a share system (/system), my sites are stores in subfolders of “sites” (/sites/site1, /sites/site2 etc.)

    Anybody an idea how to fix that?

    BR

    Zabel

  • #533 / Aug 24, 2010 9:54pm

    kimo_gusatava

    25 posts

    Hi ben,

    I was wondering how to implement $config[‘email_activation’];

    is it like?
    user register;
    system send an email confirmation code
    user click a link or enter an activation.

    Was wondering how to do this using ion_auth…


    Cheers!

  • #534 / Aug 24, 2010 10:43pm

    gscharlemann

    57 posts

    kimo_gusatava

    I’ve been monitoring the thread (and using the ion_auth package) for a while and think I can help answer your question:

    When $config[‘email_activation’] is set to true:
    1. a user registers,
    2. the user is redirected to a page and told to check their email for an activation link
    3. an email is sent to the user with the activation link
    4. when the link in the email is clicked, the users account is set to Active and they are shown a login page

    That is the default flow of the example controller provided.  You can register at http://www.pyrocms.com for an example of how it works.

  • #535 / Aug 24, 2010 11:18pm

    kimo_gusatava

    25 posts

    Thanks gscharlemann,

    yup, thats how I want to see it but was having problem with the activation part (page).
    plus I think I still have to implement the sending of email manually?
    I was wondering if there is sample code for this…

    EDIT:
    heres the issue:
    1) email not sending (I think I have to do this manually).
    2) I tried manually inputting the activation code provided by the default sample code.
    htt://domain.com/auth/activate/{id}/{activation_code}
    *I grab the code from the sql but it didn’t work.

    Now if I ever have to create an email sending the user his/her activation code, I doubt it will activate.

    I think I am missing something here.. anyone can help?


    Cheers!

  • #536 / Aug 25, 2010 3:05pm

    2think

    125 posts

    Hi all,

    I’m quite new to Codeigniter and tried to implement this Ion Auth in my upcoming project.
    Thanks in advance Ben for your great work.

    I experience some problems using Ion Auth with the example controller.
    When I try to login, I end up in an endless loop producing:

    “/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth/auth../login”
    until I stop the script execution.

    Maybe helpful to know that I have to use kind of multi sites installation.

    Means I have a share system (/system), my sites are stores in subfolders of “sites” (/sites/site1, /sites/site2 etc.)

    Anybody an idea how to fix that?

    BR

    Zabel

    It could be a problem with a few files. If I were you, I would check your index.php for the base_url, your config.php for the system and application folder values and also your htaccess file.

    Perhaps you could remove your htaccess, adjust the index.php to make sure you’re including index.php and see if that helps after making sure your system folder value and application folder value are set correctly.

  • #537 / Aug 25, 2010 5:03pm

    basementDUDE

    37 posts

    hello ben

    I am using cart class and ion auth for my project, however, user will lose their cart when they logout because in the ion_auth lib logout() function call this $this->ci->session->sess_destroy(); function.

    what I don’t understand is, you already unset all the login data above, why you still need to called sess_destory?

    I have comment it out that line, will it make ion auth less secure?

    thanks

  • #538 / Aug 25, 2010 9:24pm

    kimo_gusatava

    25 posts

    disregard my comment… :D

    My fault, I forgot I transfered the methods into another class…
    so activation works!
    except the emailing the user upon registration part, this one can be done by my part…

    Thanks!

  • #539 / Aug 25, 2010 9:24pm

    kimo_gusatava

    25 posts

    disregard my comment… :D

    My fault, I forgot I transfered the methods into another class…
    so activation works!
    except the emailing the user upon registration part, this one can be done by my part…

    Thanks!

  • #540 / Aug 26, 2010 7:29am

    martynrlee

    13 posts

    Hi,

    I am currently trying to add address details to the registration system on ion auth and struggling to pull in data to the meta db.

    I am adding fields to the $additional data array however they are not pulling through.

    Can anyone point me in the right direction? I have noticed this function: $this->ion_auth->extra_set(’‘, ‘’);

    Do I need to assign the additional fields using this, if so where?

    Here is my registration function - you can see I have added the ‘address’ field:

    //validate form input
            $this->form_validation->set_rules('first_name', 'First Name', 'required|xss_clean');
            $this->form_validation->set_rules('last_name', 'Last Name', 'required|xss_clean');
            $this->form_validation->set_rules('email', 'Email Address', 'required|valid_email');
            $this->form_validation->set_rules('phone1', 'Phone Number', 'required|xss_clean|min_length[3]|max_length[11]');
            $this->form_validation->set_rules('company', 'Company Name', 'required|xss_clean');
            $this->form_validation->set_rules('address', 'Address', 'required|xss_clean');
    
            $this->form_validation->set_rules('password', 'Password', 'required|min_length['.$this->config->item('min_password_length', 'ion_auth').']|max_length['.$this->config->item('max_password_length', 'ion_auth').']|matches[password_confirm]');
            
            $this->form_validation->set_rules('password_confirm', 'Password Confirmation', 'required');
    
            if ($this->form_validation->run() == true) {
                $username  = strtolower($this->input->post('first_name')).' '.strtolower($this->input->post('last_name'));
                $email     = $this->input->post('email');
                $password  = $this->input->post('password');
                
                $additional_data = array('first_name' => $this->input->post('first_name'),
                                         'last_name'  => $this->input->post('last_name'),
                                         'address'    => $this->input->post('address')    ,
                                         'company'    => $this->input->post('company'),
                                         'phone'      => $this->input->post('phone1'),
                                                                
                                   );
            }
            if ($this->form_validation->run() == true && $this->ion_auth->register($username,$password,$email,$additional_data)) { //check to see if we are creating the user
                    //redirect them back to the admin page
                $this->session->set_flashdata('message', "Thanks for registering, please login");
                   redirect("/auth/login/", 'refresh');
            }


    All help most appreciated.

    Martyn.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases