Welcome Guest, Not a member yet? Register   Sign In
Community Auth
#1

[eluser]skunkbad[/eluser]
I've created a new authentication system called Community Auth. I know there are a lot of choices in the wiki; maybe somebody will find it useful. Check it out and give me some feedback!

Community Auth

I also created a support thread:

http://ellislab.com/forums/viewthread/127094/
#2

[eluser]skunkbad[/eluser]
This may not apply to k2zs, but as I went through a new installation of Community Auth this weekend, I noticed that the documentation suggested that the encryption key be changed after the admin was created. Doing that would make it so the admin would never be able to log in. I actually deleted the encryption key from config/config to force the developer to set the configuration option before doing anything else. This also takes away the chance that somebody would use the one that was supplied with the download.
#3

[eluser]kacyblack[/eluser]
[quote author="skunkbad" date="1327968193"]This may not apply to k2zs, but as I went through a new installation of Community Auth this weekend, I noticed that the documentation suggested that the encryption key be changed after the admin was created. Doing that would make it so the admin would never be able to log in. I actually deleted the encryption key from config/config to force the developer to set the configuration option before doing anything else. This also takes away the chance that somebody would use the one that was supplied with the download.[/quote]



Please am trying to add the Community-auth login form on every page of my project, Please how do i get around that? Thanks
#4

[eluser]skunkbad[/eluser]
[quote author="kacyblack" date="1392970398"]Please am trying to add the Community-auth login form on every page of my project, Please how do i get around that? Thanks[/quote]

Please view the optional_login.php controller. It will show you how to add a login to every page.

So:
Code:
http://<your domain>/optional_login
#5

[eluser]kacyblack[/eluser]
Please what am trying to achieve is a Login form ontop of a page not /a page for example i want the login form to be directly on my index page, directly on my about page and not index.php/login but rather on index.php i can find a login form embbeded on it somewhere in the page that i can actually login.


So the optional login is only showing me how to achieve this www.mysite.com/login.php (http://<your domain>/optional_login ) but what i want is www.mysite.com/index.php and still yet the login form have been called, or echoed or embedded in the index.php page directly.

Thanks



AND SECONDLY..... Please am also trying to add content on the customers user index, that is when they login, they will see such content, whereas the Manager will not see it when he logs in, because it seems that the user_index.php is a=only one and is shared between the Administrator, Manager and Customer accounts, so where is the separation of what they sees when logged in occurs?
#6

[eluser]InsiteFX[/eluser]
Then you just submit the form post to the controllers method to handle it.
#7

[eluser]kacyblack[/eluser]
Please this did not answer my Question, am not really a Pro like that with CodeIgniter, how do i achieve what you just said now? And you have not answered my second Question. Thanks
#8

[eluser]kacyblack[/eluser]
Please don't answer me again, you are not saying anything worthy of understanding, Thanks, I want Skunkbad to answer this question not you anymore Please! Thanks
#9

[eluser]skunkbad[/eluser]
OK. The way community auth decides what to do with a login attempt is based on the method called:

Code:
if( $this->require_role('Sudo') ) {}

if( $this->require_min_level('1') ) {}

//etc.

This however FORCES a person to login, and automatically presents the login form. Now you said that you want the login form on every page, so built in to the design of your website will be a login form. Many times you see this at the top right corner of a web page. What you will want to do is use the same form element names that are in the other forms. So, "login_string" and "login_pass". Don't forget to generate a token, and provide it as well, or just use the form open function, which inserts a token automatically. This form that you have created could point to a single controller/method where you will handle the login attempt using:

Code:
if( $this->optional_login() ) {}

You could even send this login attempt via ajax if you know how to do that.

This should be fairly easy to understand unless you don't know CodeIgniter at all, and/or have not spent any time trying to understand how Community Auth works. If this is the case, the problem will be that you're not likely to create any useful type of application, regardless of whether or not you can figure this login form on every page. Unfortunately, I work way too much to be able to code up a special example to show you, but, if you'll take a look at the optional_login controller, I know you'll figure it out.
#10

[eluser]kacyblack[/eluser]
Ok Thanks Skunkbad, I knew you will be in position to explain it better to me Thanks I was able to solve that. But I also have this other challenge here: Please am also trying to add content on the customers user index, that is when they login, they will see such content, whereas the Manager will not see it when he logs in, because it seems that the user_index.php is a=only one and is shared between the Administrator, Manager and Customer accounts, so where is the separation of what they sees when logged in occurs?




Theme © iAndrew 2016 - Forum software by © MyBB