CodeIgniter Forums
Starting with Community Auth - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: External Resources (https://forum.codeigniter.com/forum-7.html)
+--- Forum: Addins (https://forum.codeigniter.com/forum-13.html)
+--- Thread: Starting with Community Auth (/thread-69684.html)



Starting with Community Auth - ComputingFroggy - 01-04-2018

Hi,

I've installed Community Auth to use on a new project (CodeIgniter Version 3.1.6).

I've followed the readme instructions, however I must have done something wrong as I get the errors, when displaying the page /Examples :
Code:
Message: Use of undefined constant LOGIN_PAGE - assumed 'LOGIN_PAGE' (this will throw an Error in a future version of PHP)
...
Message: Use of undefined constant AUTH_REDIRECT_PARAM - assumed 'AUTH_REDIRECT_PARAM' (this will throw an Error in a future version of PHP)

I don't know what to do to "Enable hooks" as specified at the beginning of step 12. I did modify the application/config/hooks.php file as described at step 9.

Any help would be welcomed.

Cheers,
[email protected]


RE: Starting with Community Auth - mladoux - 01-04-2018

In application/config/config.php set $config['enable_hooks'] = true; -- By default it is set to false.


RE: Starting with Community Auth - skunkbad - 01-04-2018

(01-04-2018, 07:54 PM)ComputingFroggy Wrote: Hi,

I've installed Community Auth to use on a new project (CodeIgniter Version 3.1.6).

I've followed the readme instructions...

ComputingFroggy, I see your avatar has the Ubuntu logo in it. If you're using Linux (like I do), consider the dev installer for testing purposes. As long as you're capable of setting up name based virtual hosts in Apache, with very little configuration you could be playing around with Community Auth in mere seconds:

https://bitbucket.org/snippets/skunkbad/pnLRy/community-auth-for-ci3-development

If nothing else, it would show you where all of the files go, and how the basic configuration is done.


RE: Starting with Community Auth - ComputingFroggy - 01-05-2018

Thanks to both of you : problem solved now !
A shame the .install.sh script is not as thorough as the .development_install.sh script !
May be a nice way to avoid duplication and to make sure everything is there, would be to run .install.sh from .development_install.sh ... so the latter would contain only the extra commands needed (downloads and database commands).


RE: Starting with Community Auth - skunkbad - 01-05-2018

(01-05-2018, 06:26 AM)ComputingFroggy Wrote: Thanks to both of you : problem solved now !
A shame the .install.sh script is not as thorough as the .development_install.sh script !
May be a nice way to avoid duplication and to make sure everything is there, would be to run .install.sh from .development_install.sh ... so the latter would contain only the extra commands needed (downloads and database commands).

That's a good idea.

Glad you got it working.


RE: Starting with Community Auth - ComputingFroggy - 01-05-2018

A few more questions :
  • Is there an easy (i.e. integrated to Community Auth) way to get the users list and to modify it ?
  • Is there a possibility to stay logged in (i.e. "Remember me" feature), so that next time I come back to the URL, I am connected ... still !



RE: Starting with Community Auth - skunkbad - 01-05-2018

(01-05-2018, 06:14 PM)ComputingFroggy Wrote: A few more questions :
  • Is there an easy (i.e. integrated to Community Auth) way to get the users list and to modify it ?
  • Is there a possibility to stay logged in (i.e. "Remember me" feature), so that next time I come back to the URL, I am connected ... still !

1) You would just use CodeIgniter to access and modify your users. Simple database queries should be all you need.
2) See the section starting "Allow Remember Me" on this page: https://community-auth.com/documentation/configuration/authentication-php


RE: Starting with Community Auth - ComputingFroggy - 01-06-2018

1) a shame that Community Auth does not provide an interface to access and modify the users ... but then again, it's possible to use a CRUD tool to generate the code to do it.
2) Thanks, I oversaw it in the doc.


RE: Starting with Community Auth - skunkbad - 01-06-2018

(01-06-2018, 10:25 AM)ComputingFroggy Wrote: 1) a shame that Community Auth does not provide an interface to access and modify the users ... but then again, it's possible to use a CRUD tool to generate the code to do it.
2) Thanks, I oversaw it in the doc.

Community Auth used to provide all kinds of things, and user management was one of them. It seemed that the overall consensus was that this was not desirable, so it was removed a couple years ago. Those kind of features actually made Community Auth harder to integrate into an existing project.