mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-05-07 05:53:07 +00:00
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:
parent
a49e142808
commit
7c04fd3789
3 changed files with 10 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ use App\Mail\NewsletterRegistration;
|
|||
|
||||
class RegisterController extends Controller
|
||||
{
|
||||
private $emailCodeSize = 12;
|
||||
private $emailCodeSize = 13;
|
||||
|
||||
public function register(Request $request)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue