Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function delete(Request $request, ScriptExecutor $scriptExecutor, ScriptM
exec($cmd, $out, $return);

if ($return !== 0) {
throw ValidationException::withMessages(['delete' => _('Error removing image.') . " {$cmd} " . implode("\n", $out)]);
throw ValidationException::withMessages(['delete' => __('Error removing image.') . " {$cmd} " . implode("\n", $out)]);
}
}

Expand Down
2 changes: 1 addition & 1 deletion ProcessMaker/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ function () use ($user) {
protected function throwLockedLoginResponse()
{
throw ValidationException::withMessages([
$this->username() => [_('Account locked after too many failed attempts. Contact administrator.')],
$this->username() => [__('Account locked after too many failed attempts. Contact administrator.')],
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function validateTwoFactorAuthCode(Request $request)
// If empty code return error message
if (empty($code)) {
// Set error message
session()->put(self::TFA_ERROR, _('Invalid code.'));
session()->put(self::TFA_ERROR, __('Invalid code.'));

// Return to 2fa page
return redirect()->route('2fa');
Expand All @@ -98,7 +98,7 @@ public function validateTwoFactorAuthCode(Request $request)
$route = 'login';
} else {
// Set error message
session()->put(self::TFA_ERROR, _('Invalid code.'));
session()->put(self::TFA_ERROR, __('Invalid code.'));

// Return to 2fa page
$route = '2fa';
Expand Down Expand Up @@ -153,7 +153,7 @@ public function testSettings(Request $request)
if (count($enabled) === 0) {
$message = [
'status' => 'error',
'message' => __('The two-step method must be selected.')
'message' => __('The two-step method must be selected.'),
];
$status = 500;
}
Expand Down Expand Up @@ -237,6 +237,7 @@ public static function check2faByGroups()
{
try {
$user = Auth::user();

return $user->in2FAGroupOrIndependent();
} catch (Exception $e) {
session()->put(self::TFA_ERROR, $e->getMessage());
Expand Down
4 changes: 2 additions & 2 deletions ProcessMaker/Http/Middleware/VerifyChangePasswordNeeded.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class VerifyChangePasswordNeeded
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
Expand All @@ -23,7 +23,7 @@ public function handle($request, Closure $next)

if ($this->checkPasswordExpiration()) {
// Set the error message
session()->put('login-error', _('Your password has expired.'));
session()->put('login-error', __('Your password has expired.'));

// Redirect to change password screen
return redirect()->route('password.change');
Expand Down
6 changes: 3 additions & 3 deletions ProcessMaker/Notifications/TwoFactorAuthNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TwoFactorAuthNotification extends Notification
/**
* Create a new notification instance.
*
* @param \ProcessMaker\Models\User $user
* @param User $user
* @param string $code
*/
public function __construct(User $user, string $code)
Expand All @@ -43,12 +43,12 @@ public function via($notifiable)
* Get the mail representation of the notification.
*
* @param mixed $notifiable
* @return \Illuminate\Notifications\Messages\MailMessage
* @return MailMessage
*/
public function toMail($notifiable)
{
return (new MailMessage)
->subject(_('Security Code'))
->subject(__('Security Code'))
->greeting($this->user->username)
->line(__('This is your security code: :code', ['code' => $this->code]));
}
Expand Down
Loading