Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2

[eluser]huuray[/eluser]
when i try to use ion-auth in HMVC,
Code:
$this->data['title'] = 'test';
$this->load->view('users/login', $this->data);
in view,$title have no value.
any idea?

[eluser]jsherk[/eluser]
Hi Ben

I just started using CI a couple days ago, and just downloaded Ion Auth a couple of hours ago!

I am glad you are putting some docs together... here is my request, as a newbie to both CI and Ion Auth, for what I need to continue my project:

#1 - Table schema - What is the minimum default table layout for each table.
#2 - Require Login - Everytime I load a page, how do I check if somebody is logged in and if they are authorized to view that particular page?

The docs so far are helpful, but the above two items would help me out immensely.

Thanks

[eluser]Ben Edmunds[/eluser]
huuray,

Try just using $data instead of $this->data.

[eluser]huuray[/eluser]
thanks ben,i figured out.
just put <code>var $data;</code> in controller.

[eluser]huuray[/eluser]
how to set user can login using username/email ?

[eluser]jsherk[/eluser]
Answers to my own post above...

#1 - Regarding table schema, there are two files located on github (http://github.com/benedmunds/CodeIgniter-Ion-Auth) which contain the table schema.. one for postgres and one for mysql:
Code:
ion_auth.postgre.sql
ion_auth.sql

#2 Regarding how to check if somebody is logged in, you can use the following at the top of each function/page in your controller file:
Code:
if (!$this->ion_auth->logged_in()) {
  //redirect them to the login page
  redirect('auth/login', 'refresh');
}

So again, just a suggestion for the documentation, but as a new use to CI and to Ion Auth and to Github, these were the two obstacles that slowed me down to a crawl, so maybe they could be added in.

Thanks

[eluser]Sandyandi N. dela Cruz[/eluser]
Hi Ben,

I'm sorry I don't know how to use GitHub.
Your code is better than mine (not familiar with the vars) so I'll use it.

Thanks a lot!

[eluser]Ben Edmunds[/eluser]
huuray,

Are you asking how to switch the identity or are you wanted to enable login using either username or email?

[eluser]Ben Edmunds[/eluser]
Hey everybody,

I've updated the documentation a lot this weekend. Please take a look and let me know any mistakes, omissions, suggestions.

http://benedmunds.com/ion_auth/


Thanks!

[eluser]dhaulagiri[/eluser]
why I am getting this error

Quote:Severity: 4096
Message: Object of class stdClass could not be converted to string
Filename: libraries/Loader.php(673) : eval()'d code
Line Number: 3

while doing
Code:
&lt;?php echo $this->ion_auth->get_user();?&gt;




Theme © iAndrew 2016 - Forum software by © MyBB