Move the validation code to 13 characters

Validate the account automatically if a password is already set
Bump RPM package version to 31
This commit is contained in:
Timothée Jaussoin 2020-10-12 14:11:22 +02:00
parent a49e142808
commit 7c04fd3789
3 changed files with 10 additions and 3 deletions

View file

@ -35,7 +35,7 @@ use App\Mail\PasswordAuthentication;
class AuthenticateController extends Controller
{
private $emailCodeSize = 12;
private $emailCodeSize = 13;
public function login(Request $request)
{
@ -107,6 +107,13 @@ class AuthenticateController extends Controller
$account = Account::where('confirmation_key', $code)->firstOrFail();
$account->confirmation_key = null;
// If there is already a password set, we directly activate the account
if ($account->passwords()->count() != 0) {
$account->activated = true;
$account->save();
}
$account->save();
Auth::login($account);

View file

@ -37,7 +37,7 @@ use App\Mail\NewsletterRegistration;
class RegisterController extends Controller
{
private $emailCodeSize = 12;
private $emailCodeSize = 13;
public function register(Request $request)
{

View file

@ -8,7 +8,7 @@
#%define _datadir %{_datarootdir}
#%define _docdir %{_datadir}/doc
%define build_number 30
%define build_number 31
%define var_dir /var/opt/belledonne-communications
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager
%define env_file "$RPM_BUILD_ROOT/etc/flexisip-account-manager/flexiapi.env"