[DEV-328] Fix array offset on null in /user/login (#1185)
This commit is contained in:
parent
a5da776d27
commit
a74d6ab4d7
|
@ -19,7 +19,7 @@ class User extends DataStore {
|
|||
public static function authenticate($userEmail, $userPassword) {
|
||||
$user = User::getUser($userEmail, 'email');
|
||||
|
||||
return ($user && Hashing::verifyPassword($userPassword, $user->password) && !$user->notRegistered) ? $user : new NullDataStore();
|
||||
return (!$user->isNull() && Hashing::verifyPassword($userPassword, $user->password) && !$user->notRegistered) ? $user : new NullDataStore();
|
||||
}
|
||||
|
||||
public static function getProps() {
|
||||
|
|
|
@ -27,7 +27,7 @@ describe '/staff/assign-ticket' do
|
|||
|
||||
#end
|
||||
|
||||
it 'should assign ticket if everything is okey' do
|
||||
it 'should assign ticket if everything is okay' do
|
||||
ticket1 = $database.getRow('ticket', 'ticket_to_assing_1', 'title')
|
||||
ticket2 = $database.getRow('ticket', 'ticket_to_assing_2', 'title')
|
||||
ticket3 = $database.getRow('ticket', 'ticket_to_assing_3', 'title')
|
||||
|
|
|
@ -6,7 +6,7 @@ describe '/ticket/seen' do
|
|||
|
||||
Scripts.login($staff[:email], $staff[:password], true)
|
||||
Scripts.assignTicket(ticket['ticket_number'])
|
||||
it 'should change unread if everything is okey ' do
|
||||
it 'should change unread if everything is okay ' do
|
||||
|
||||
result = request('/ticket/seen', {
|
||||
ticketNumber: ticket['ticket_number'],
|
||||
|
@ -38,7 +38,7 @@ describe '/ticket/seen' do
|
|||
|
||||
Scripts.logout()
|
||||
Scripts.login('user_get@os4.com', 'user_get')
|
||||
it 'should change unread if everything is okey ' do
|
||||
it 'should change unread if everything is okay ' do
|
||||
ticket = $database.getRow('ticket', 'Should we pay?', 'title')
|
||||
result = request('/ticket/seen', {
|
||||
ticketNumber: ticket['ticket_number'],
|
||||
|
|
Loading…
Reference in New Issue