Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] User Registration #25

Closed
Denoder opened this issue May 24, 2015 · 3 comments
Closed

[Question] User Registration #25

Denoder opened this issue May 24, 2015 · 3 comments

Comments

@Denoder
Copy link

Denoder commented May 24, 2015

So with the Access Seeder making the User Role
How does one put the user in the User Role as soon as they confirm their account?

@rappasoft
Copy link
Owner

It does it automatically. See EloquentUserRepository.php for frontend:

public function create($data, $provider = false) {
        $user = User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => $provider ? null : $data['password'],
            'confirmation_code' => md5(uniqid(mt_rand(), true)),
            'confirmed' => config('access.users.confirm_email') ? 0 : 1,
        ]);
        $user->attachRole($this->role->getDefaultUserRole());
        if (config('access.users.confirm_email'))
            $this->sendConfirmationEmail($user);
        return $user;
    }

Specify the default role in access.php config file.

@Denoder
Copy link
Author

Denoder commented May 26, 2015

ah thank you.
I changed the Name from User to Member so it wasnt registering.

@rappasoft
Copy link
Owner

Glad you got it working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants