Welcome Guest, Not a member yet? Register   Sign In
DX Auth 1.0.6 (Authentication library)

[eluser]mocsa1[/eluser]
Hi Guys,

Does anybody happen to know how was the documentation for DX Auth generated. It looks exactly the same as CodeIgniter's. I hope there is a tool which can generate in a format like that.

Thanks

[eluser]umefarooq[/eluser]
hi im trying to use the this library but facing this problem i tried to login its give me the following error
Code:
A Database Error Occurred
Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `ip_address` = '127.0.0.1'' at line 2

SELECT 1 WHERE `ip_address` = '127.0.0.1'

table name is missing in the query.

[eluser]OliverHR[/eluser]
Please include user guide documentation in download.

[eluser]JayArias[/eluser]
Question how can I use the session information on my pages

eg
Code:
$_SESSION['emailadress']

I would Like to do the following

Code:
<?php if($_SESSION['logged_in'])
{
echo "link";
}else{
echo "non-member link";
}?>

[eluser]Hartimer[/eluser]
[quote author="Tego10122" date="1233188424"]Question how can I use the session information on my pages

eg
Code:
$_SESSION['emailadress']

I would Like to do the following

Code:
<?php if($_SESSION['logged_in'])
{
echo "link";
}else{
echo "non-member link";
}?>
[/quote]

You do have a is_logged_in() method..

You could use something like

Code:
<?php if($this->dx_auth->is_logged_in())
{
echo "link";
}else{
echo "non-member link";
}?>

if you MUST use $_SESSION may alter the "login" (and logout) method of dx_auth so when logging in it would register the session variable..

As for email (dx_auth email at least) i believe they have an entry on the session lib of CI itself..

Code:
$this->session->dx_auth_email;

Not sure about the real names of the methods/varaibles, I don't have access to the lib right now, so i can't be more specific.. hope it helps though

[eluser]JayArias[/eluser]
Code:
Message: Undefined property: CI_Loader::$dx_auth

[eluser]JayArias[/eluser]
Fixed it
Code:
$autoload['libraries'] = array('DX_Auth','DX_Auth_Event');

Question is now , which was still not answered. "How do I pull information from my users table from the logged in user".

[eluser]JayArias[/eluser]
anyone?

[eluser]Hartimer[/eluser]
[quote author="Tego10122" date="1233189811"]Fixed it
Code:
$autoload['libraries'] = array('DX_Auth','DX_Auth_Event');

Question is now , which was still not answered. "How do I pull information from my users table from the logged in user".[/quote]

You should really check the documentation.

You have session info like

Code:
echo $this->session->userdata('DX_username');
echo $this->session->userdata('DX_role_name');

You can also use the model from dx_auth, which has methods such as "get_profile($user_id)".
(and yes u have to load the models)

[eluser]samseko[/eluser]
i have some simple checks to see if someone is logged in and provide a link to the Profile and Logout page. If they are not logged in, a Login and Register link is provided. And if i am logged in, an addition Admin link is provided.

If i log in and tick the check box to remember me, everything is fine if i close the browser and open it up in a short space of time. That is, it remembers i am logged in and the relevant links are displayed.

I am having an issue where if i close the browser and open it up after a long period of time ( such as the next day ) i am logged in but the '$this->session->userdata('user') == 'sam') appears not to catch the fact i am logged in via a cookie session. I can verify that the Admin side of it is functional though.

Any fix for this?




Theme © iAndrew 2016 - Forum software by © MyBB