[Ivan Diaz] - Remove isAdmin property form user model
This commit is contained in:
parent
b44f6f18dc
commit
e7445a1c21
|
@ -39,7 +39,6 @@ class LoginController extends Controller {
|
|||
return array(
|
||||
'userId' => $userInstance->id,
|
||||
'userEmail' => $userInstance->email,
|
||||
'userIsAdmin' => $userInstance->admin,
|
||||
'token' => $this->getSession()->getToken()
|
||||
);
|
||||
}
|
||||
|
|
|
@ -19,8 +19,7 @@ class SignUpController extends Controller {
|
|||
$userInstance = new User();
|
||||
$userInstance->setProperties(array(
|
||||
'email' => $email,
|
||||
'password' => User::hashPassword($password),
|
||||
'admin' => 0
|
||||
'password' => User::hashPassword($password)
|
||||
));
|
||||
|
||||
return $userInstance->store();
|
||||
|
|
|
@ -20,15 +20,12 @@ class User extends DataStore {
|
|||
public static function getProps() {
|
||||
return array(
|
||||
'email',
|
||||
'password',
|
||||
'admin',
|
||||
'password'
|
||||
);
|
||||
}
|
||||
|
||||
public function getDefaultProperties() {
|
||||
return [
|
||||
'admin' => 0
|
||||
];
|
||||
return array();
|
||||
}
|
||||
|
||||
public static function getUser($value, $property = 'id') {
|
||||
|
|
|
@ -14,7 +14,6 @@ class User extends \Mock {
|
|||
$mockUserInstance->id = 'MOCK_ID';
|
||||
$mockUserInstance->email = 'MOCK_EMAIL';
|
||||
$mockUserInstance->password = 'MOCK_PASSWORD';
|
||||
$mockUserInstance->admin = 'MOCK_ADMIN_VALUE';
|
||||
|
||||
return $mockUserInstance;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ class LoginControllerTest extends PHPUnit_Framework_TestCase {
|
|||
$this->assertTrue(Response::get('respondSuccess')->hasBeenCalledWithArgs(array(
|
||||
'userId' => 'MOCK_ID',
|
||||
'userEmail' => 'MOCK_EMAIL',
|
||||
'userIsAdmin' => 'MOCK_ADMIN_VALUE',
|
||||
'token' => 'TEST_TOKEN'
|
||||
)));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue