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

(This post was last modified: 08-19-2015, 04:06 AM by solidcodes.)

Okay I already fixed the APPATH issue.

Now I'm trying to test the login method create_user().
Using the settings below

Code:
// Customize this array for your user
        $user_data = array(
            'user_name'     => 'xeon9',
            'user_pass'     => 'asdf1234',
            'user_email'    => '[email protected]',
            'user_level'    => '9', // 9 if you want to login @ examples/index.
        );

I tried logging in but the system always says 'invalid username or email'
What's might be wrong here?

@Robert
Help please?
I'm trying to familiarize myself into your "User Authentication" system.

Thanks in advance.
Reply
#2

(This post was last modified: 08-19-2015, 04:27 AM by solidcodes.)

I change the data into this,

// Customize this array for your user
$user_data = array(
'user_name' => 'iridion9',
'user_pass' => 'Iridion9@2015',
'user_email' => '[email protected]',
'user_level' => '9', // 9 if you want to login @ examples/index.
);

But the same error message.

Robert? help please.
Reply
#3

Okay no worries @Brian.
I will try to understand the documentation and your examples.php controller.
Will post here when everything is okay.
Reply
#4

@Brian
Do you have documentation on how to install and use Community-Auth properly under HMVC, specially wiredesignz HMVC?
If hope there is...
Reply
#5

(08-20-2015, 06:32 PM)solidcodes Wrote: @Brian
Do you have documentation on how to install and use Community-Auth properly under HMVC, specially wiredesignz HMVC?
If hope there is...

I have never felt the need to use HMVC with CI, and as a special customization, you would need to figure out integration on your own.
Reply
#6

(08-20-2015, 07:41 PM)skunkbad Wrote:
(08-20-2015, 06:32 PM)solidcodes Wrote: @Brian
Do you have documentation on how to install and use Community-Auth properly under HMVC, specially wiredesignz HMVC?
If hope there is...

I have never felt the need to use HMVC with CI, and as a special customization, you would need to figure out integration on your own.

Okay will figure out myself.
Thanks again for your answer.
Reply
#7

@Brian

What is the proper way to change 'Admin' into 'SuperAdmin'?
Thanks again in advance.
Reply
#8

I know I can go directly to authentication.php
and change this code below,

Code:
$config['levels_and_roles'] = array(
    '1' => 'customer',
    '6' => 'manager',
    '9' => 'admin'
);

But I'm not sure if this is the proper way?
Is there anything else should I change to make the change work properly?
Reply
#9

(This post was last modified: 08-21-2015, 04:11 AM by solidcodes.)

I tried accessing /examples/create_user
Now I have this error message?

Code:
A PHP Error was encountered

Severity: Warning

Message: mt_rand(): max(-1) is smaller than min(1200)

Filename: controllers/Examples.php

Line Number: 433

Backtrace:

File: C:\xampp\htdocs\ci\ci3-community-auth\application\controllers\Examples.php
Line: 433
Function: mt_rand

File: C:\xampp\htdocs\ci\ci3-community-auth\application\controllers\Examples.php
Line: 183
Function: _get_unused_id

File: C:\xampp\htdocs\ci\ci3-community-auth\index.php
Line: 292
Function: require_once

What could be possibly the reason, help please?
Reply
#10

Okay I just modified the codes,

Code:
private function _get_unused_id()
    {
        // Create a random user id
        //$random_unique_int = mt_rand(1200, 4294967295);
    $random_unique_int = mt_rand();

        // Make sure the random user_id isn't already in use
        $query = $this->db->where('user_id', $random_unique_int)
            ->get_where(config_item('user_table'));

        if ($query->num_rows() > 0) {
            $query->free_result();

            // If the random user_id is already in use, get a new number
            return $this->_get_unused_id();
        }

        return $random_unique_int;
    }

It works now, but I'm not sure why brian did that.
Brian??? lol
Reply




Theme © iAndrew 2016 - Forum software by © MyBB