| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Working with users/Creating Users external | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Working with users/Creating Users external
If you can create a user with the following:
$profile->setLogin('bit-bucket@x-cart.com'); $profile->setPassword(\XLite\Core\Auth::encryptPassword('te ster')); Is there a way to set the user access level to Admin instead of Customer? Any help is appreciated. Thanx
__________________
V5.2.13 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Working with users/Creating Users external
Maybe try
Code:
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#3
|
|||||||
|
|||||||
Re: Working with users/Creating Users external
totaltec.. I tried that and it does set them as administrator but the Administrator role still has be be added to "roles".
In other words.. It sets the "Access Level" to administrator under the user tab but it will not add the Administrator the "Roles".
__________________
V5.2.13 |
|||||||
#4
|
|||||||
|
|||||||
Re: Working with users/Creating Users external
totaltec, Thanks for the advice.
I tried that and it does set the Access level to Administrator but to full work it also needs to set the "Roles" as Administrator. Or, add the Administrator to the Roles.
__________________
V5.2.13 |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Working with users/Creating Users external
Quote:
Looks a little tougher to figure this part out. Something like $profile->addPermissions($permissions), but I am not sure what the value of $permissions should be! Or if that method is even accessible to that object. I'm shooting in the dark here, glad the first bit worked. Perhaps Tony or someone else with knowledge can shed some light. I could certainly work this out for you, but I can't do it off the top of my head without research.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
#6
|
|||||||
|
|||||||
Re: Working with users/Creating Users external
I think I got it. You have to add the role after the user is created.
$profile->addRoles($role); $profile->create(); $role->addProfiles($profile);
__________________
V5.2.13 |
|||||||
|
|
|||
X-Cart forums © 2001-2020
|