src/Stevemo/Cpanel/User/Repo/UserRepository.php
protected function storeUser(array $credentials, $activate = false)
    {
        $cred = array(
            'first_name'  => $credentials['first_name'],
            'last_name'   => $credentials['last_name'],
            'email'       => $credentials['email'],
            'password'    => $credentials['password'],
        );

        if ( array_key_exists('permissions',$credentials) )
        {
            $cred['permissions'] = $credentials['permissions'];
        }

        $user = $this->sentry->register($cred,$activate);

        if ( array_key_exists('groups',$credentials) )
        {
            $this->syncGroups($credentials['groups'], $user);
        }

        return $user;
    }
protected function storeUser(array $credentials, $activate = false)
    {
        $cred = array(
            'first_name'  => $credentials['first_name'],
            'last_name'   => $credentials['last_name'],
            'email'       => $credentials['email'],
            'password'    => $credentials['password'],
        );

        if ( array_key_exists('permissions',$credentials) )
        {
            $cred['permissions'] = $credentials['permissions'];
        }

        $user = $this->sentry->register($cred,$activate);

        if ( array_key_exists('groups',$credentials) )
        {
            $this->syncGroups($credentials['groups'], $user);
        }

        return $user;
    }
protected function storeUser ( array $ credentials , $ activate = false ) { $ cred = array ( 'first_name' => $ credentials [ 'first_name' ] , 'last_name' => $ credentials [ 'last_name' ] , 'email' => $ credentials [ 'email' ] , 'password' => $ credentials [ 'password' ] , ) ; if ( array_key_exists ( 'permissions' , $ credentials ) ) { $ cred [ 'permissions' ] = $ credentials [ 'permissions' ] ; } $ user = $ this -> sentry -> register ( $ cred , $ activate ) ; if ( array_key_exists ( 'groups' , $ credentials ) ) { $ this -> syncGroups ( $ credentials [ 'groups' ] , $ user ) ; } return $ user ; }
Create user into storage

@author Steve Montambeault
@link   http://stevemo.ca

@param array $credentials
@param bool  $activate

@return \Cartalyst\Sentry\Users\UserInterface
Create user into storage