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

[eluser]Alfredor[/eluser]
Could you post your register view code?
#72

[eluser]jonathanstegall[/eluser]
Well, nevermind. I must have forgotten to clear the sessions table to reflect the group. I truncated the MySQL table, and all is well. Thanks muchly for pointing me in that direction.

Jonathan
#73

[eluser]jonathanstegall[/eluser]
One more question on this library. Is it currently possible to restrict the edit functionality to the user who owns it? For example, I am a logged in user, and a member of the 'users' group - it would be great to edit my own profile, but not anyone else's (like the editors and admins can).

Thanks for any thoughts
Jonathan
#74

[eluser]Alfredor[/eluser]
You just have to run querys, it would be something like $this->db->where('user',$this->auth->get_user);
Note: I havent search too much on this library so I can't exactly tell the query.
#75

[eluser]moopa[/eluser]
Hi Adam / Everyone.

Fairly new to CI and spent the morning installing the library.
Works great when using your login panel, but I am struggling a bit to implement the login on my own views.

Making my own form and logging in is no problem as long as the user is valid, but I wish to take advantage of your validation and cookie implementation in the Auth.php login method if the user credentials are invalid.

Example:-

My login form view is /home/register.
In the controller I have

Code:
function register()
{
$this->auth->login('/photos/view');
// Other stuff
}

But if the login fails, I wish to return to home/register and display all the errors found in Auth.php login. I note that you have these lines

Code:
if($this->CI->form_validation->run() == FALSE)
        {
            if((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))
            {
                echo $this->CI->lang->line('max_login_attempts_error');
            }
            else
            {
                $this->view('login');
            }
        }

How do I successfully go back to my view with any errors instead of $this->view('login')?

Thanks very much,

Moopa
#76

[eluser]moopa[/eluser]
I worked it out by simply removing the else clause to load the view.
#77

[eluser]Gorelog[/eluser]
I had trouble using the navigation within the pages of the site. Several 404's. I believe I got everything copied over correctly.

- PHP 5+
- Auth lib 1.0.6
- CI 1.7.2

The first links listed for each page are the ones that I was directed to within the app. The second link is what actually worked. It seems that sometimes the "admin" directory is needed in the url and sometimes it is not.

Dashboard
http://local.ci/index.php/admin/dashboard

Logout
http://local.ci/index.php/logout (takes me to the dashboard, does not logout)
http://local.ci/index.php/admin/logout (works)

Login
http://local.ci/index.php/login (works)
http://local.ci/index.php/admin/login (works)

Register
http://local.ci/index.php/register (displays the login page)
http://local.ci/index.php/admin/register (works)

Manage Users
http://local.ci/index.php/admin/users/manage (404)
http://local.ci/index.php/users/manage (woks)

Delete User
http://local.ci/index.php/admin/users/delete/1 (404)
http://local.ci/index.php/users/delete/1 (works)

Edit User
http://local.ci/index.php/admin/users/edit/1 (404)
http://local.ci/index.php/users/edit/1 (works)


Obviously it is pretty easy to change these, but I wanted to point this out in case I missed something that I need to make a change on my end somewhere, or just to bring this to your attention.

Thanks for the code.
#78

[eluser]Unknown[/eluser]
First of all thanks for sharing this cool library with the community, it's really appreciated.

Ok, I'm a total newb, and I'd like to know how to allow users to change their email address, password and delete their account

thanks
PAul
#79

[eluser]joytopia[/eluser]
I think, the Auth-Library brings the basic functionality and you have to write your own controllers for your purposes.

Best regards

Bernd
#80

[eluser]LonestarGEEK[/eluser]
For some reason I can't seem to load the 'Application' class. I get a fatal error saying it's not found. I've placed the MY_Controller in the autoload file but no use. Anybody got any ideas? I followed the instructions and have looked through everything but nothing.

Thanks for the help!




Theme © iAndrew 2016 - Forum software by © MyBB