large commit

This commit is contained in:
Omair Saleh
2019-06-03 16:24:20 +08:00
parent c59535d991
commit 2aa9ddedde
3 changed files with 3 additions and 3 deletions
@@ -22,6 +22,7 @@ class UserInvitationObject
* @param int $role
* @param string $inviteeEmail
* @param null|string $hash
* @throws \Exception
*/
public function __construct(int $role, string $inviteeEmail, ?string $hash = null)
{
@@ -2,7 +2,6 @@
namespace App\Classes\Modules\ControllersLogic\Accounts;
use App\Classes\Modules\Accounts\DataTransferObjects\UserInvitationObject;
use App\Classes\Modules\Accounts\Services\CreatesUserInvitation;
use App\Classes\Modules\Accounts\Validation\CanSendAccountInvitation;
@@ -42,7 +41,6 @@ class CreateAccountInvitationLogic
public function execute(Request $request) {
try {
$object = new UserInvitationObject($request->get('role_id'), $request->get('email'));
if($this->canSendAccountInvitation->execute($object)){
+2 -1
View File
@@ -9,8 +9,9 @@ final class common
/**
* @param int $length
* @return string
* @throws \Exception
*/
public static function generateRandomHash(int $length = 10): string {
return substr(bin2hex(ceil($length / 2)), 0, $length);
return substr(bin2hex(random_bytes(ceil($length / 2))), 0, $length);
}
}