Welcome Guest, Not a member yet? Register   Sign In
The Authentication Library 1.0.6
#31

[eluser]joytopia[/eluser]
Hi Adam,

since I looked for a realy secure forgot password functionality in the web, I learned that it is not a technological but a conceptional problem. Especially with CI it is very easy to send e-mails, make random strings and so on. So I will build my own one.

Thank you for your great work, Adam!

Best regards,
Bernd
#32

[eluser]InsiteFX[/eluser]
Sorry Adam,

I was refering to this code in the register method.

Code:
if ($this->config['auth_remember'] === TRUE)
{
   $this->_generate();
}

So what is this code doing Adam?

For remember me you just need to set it in a cookie right.

Enjoy
InsiteFX
#33

[eluser]Adam Griffiths[/eluser]
[quote author="InsiteFX" date="1252582689"]Sorry Adam,

I was refering to this code in the register method.

Code:
if ($this->config['auth_remember'] === TRUE)
{
   $this->_generate();
}

So what is this code doing Adam?

For remember me you just need to set it in a cookie right.

Enjoy
InsiteFX[/quote]

That's the remember me function, not a forgot password function. Smile


Thanks.
#34

[eluser]InsiteFX[/eluser]
Thanks Adam,

Was a little confuse on that one, but cleared up.

I have all the stuff in my old system I'll see if I can get it converted over.

Oh and are you making any progress on the page sections?

I have the menuing system almost finished, just debugging it and clean up.

Enjoy
InsiteFX
#35

[eluser]NateL[/eluser]
A few questions after using the Auth library for a bit...

How does the auth library pass information to the view?

If I have the following controller (note the 'pagetitle'):
Code:
class Pages extends Application
{
    
    function Pages()
    {
        parent::Application();
                
        $this->auth->restrict('admin');
        $this->load->model($this->models."pagesmodel", 'pages');
        
        $data['pagetitle'] = 'Page Management';
    }
    function manage(){
        $data['pages'] = $this->pages->get_all_pages(); // Grab an array of all pages from the database
        
        $this->auth->view('pages/manage');
    }
}

My view (manage.php) will display an array of pages (i have just var_dump($data) in manage.php)

What I don't understand is why $data['pagetitle'] = 'Page Management'; does not come through?

However, if I put $data['pagetitle'] = 'Page Management'; inside the manage method, it comes through.

any ideas?



Some other questions and suggestions...
Do you intend on adding additional information to the "edit user" page? Right now, all a user can edit is their e-mail address.

Really, users should be able to modify their password too. Admins should be able to change their user group from a drop down.
#36

[eluser]InsiteFX[/eluser]
Hi,

You could pass it in like so:

Code:
function manage($data)

Also

$this->auth->view('pages/manage', $data);

Enjoy
InsiteFX
#37

[eluser]Adam Griffiths[/eluser]
If you change this to be $this->data instead of $data and declare the variable before the constructor, the "Page Management" will come through.


Thanks,
Adam
#38

[eluser]samhQC[/eluser]
Hi,

Does anyone have any suggestions why loading Auth would be slow ?

If I load Auth in a controller, or add it to autoload, it adds about 2 seconds to page load time on localhost!

Profiling tell me that the database queries are actually pretty fast

0.0004 SELECT *
FROM (`ci_sessions`)
WHERE `session_id` = '_some_data_here_'
AND `user_agent` = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) Ap'

0.0004 UPDATE `users` SET `identifier` = '_some_data_here_', `token` = '_some_data_here_' WHERE `username` = '_some_data_here_'

Suggestions appreciated, thanks.
#39

[eluser]InsiteFX[/eluser]
That is because your suppose to extend the Auth Controller see below.

Code:
class Example extends Application
{
    function Example()
    {
        parent::Application();
    }
}

Enjoy
InsiteFX
#40

[eluser]samhQC[/eluser]
InsiteFx, Thanks for the help.

I was doing it incorrectly, I have modified my controller to extend the Application class, and have it's contructor call parent::Application();

But the page is stil taking over 2 seconds to load.

Hmm




Theme © iAndrew 2016 - Forum software by © MyBB