Welcome Guest, Not a member yet? Register   Sign In
Redux Auth - is it dead?
#21

[eluser]klompie[/eluser]
i downloaded the most recent version from http://github.com/benedmunds/CodeIgniter-Ion-Auth

return (bool) $user_group == $admin_group;

isn't this casting the $user_group as bool? and not the complete $user_group == $admin_group?

When using:
return (bool)($user_group == $admin_group);
or
return (bool) $user_group == $admin_group;
it works like it should do.

But when using:
return (bool) $user_group == $admin_group;
every group is returning true
#22

[eluser]Phil Sturgeon[/eluser]
Yes you are totally right, I was being an idiot. It was comparing TRUE to 'whatevergroup' which in PHP will return TRUE. It has been removed. Sorry for that very, very stupid mistake.
#23

[eluser]Kinsbane[/eluser]
Sorry if this is a bit daft, but, what's the default admin password for Ion Auth? Thought it would be in the config file, but it isn't.
#24

[eluser]klompie[/eluser]
it is
user: admin@admin.com
pass: password
#25

[eluser]joytopia[/eluser]
Phil,

what is the reason for using two tables like users and meta rather than one single users-table?

Best regards
Bernd
#26

[eluser]Queops[/eluser]
[quote author="joytopia" date="1265217276"]Thank you, 2think,
now I got it running. At the first glance it looks very well.

One question:

normally a controller starts like this:

Code:
class Test extends Controller {

    function Test()
    {
        parent::Controller();

but the controller in Ion Auth starts like that:

Code:
class Auth extends Controller {

    function __construct()
    {
        parent::__construct();

What is the difference, and how do I have to deal with it?

Thanks and best regards,
Bernd[/quote]

It's the same thing.
PHP 5 uses the construct function as __construct() where you used to have the class name. So if no __construct() is found PHP will search for ClassName() instead.
I read this in a recent PHP 5.3 book and they recommend you to use __construct() and __destruct(). (And to be honest it looks better this way! it's easier to see them)

For more information:
http://php.net/manual/en/language.oop5.decon.php
#27

[eluser]joytopia[/eluser]
2think, Queops,
thanks for your answers! Somewhere I read, that CI 2.0 will be php 5 only.

Phil,
I saw, that you have transactions in the model. So I should better change my tables to innoDB?

Since we will have a lot of user generated content in our project, innoDB will be the better choice in general?

Thanks and best regards
Bernd
#28

[eluser]Kinsbane[/eluser]
[quote author="klompie" date="1265476407"]it is
user: admin@admin.com
pass: password[/quote]

Thank you!
#29

[eluser]2think[/eluser]
[quote author="joytopia" date="1265581167"]Phil,

what is the reason for using two tables like users and meta rather than one single users-table?

Best regards
Bernd[/quote]

Bernd,

I think the use of the two tables allows the developer to extend details about a user should they need it, for example, future roles support, shipping address, whatever else. At least that is my assumption, don't know for sure.
#30

[eluser]joytopia[/eluser]
2think, thank you!

There also could be some more good reasons to have two separate tables:
- Database performance: When users edit their profile, they only work in the meta-table,
- an existing user-table can be used as meta-table without any changes.




Theme © iAndrew 2016 - Forum software by © MyBB