Quantcast
Viewing all articles
Browse latest Browse all 25

Answer by The Billionaire Guy for Login only if user is active using Laravel

Thanks @Can_Celik

this was how I was able to solve my issue becos i was using json response with jquery.

/**     * Validate the user login request.     *     * @param  \Illuminate\Http\Request  $request     * @return void     */    protected function validateLogin(Request $request)    {        $this->validate($request, ['email' => 'required|email|exists:users_table,email,account_status_colunm,active_value','password' => 'required',        ]);    }

then in the validation.php file add this to your Custom Validation strings

...'email' => ['exists' => 'Account has been disabled. Contact our team.'    ],

that's about all...works fine ...


Viewing all articles
Browse latest Browse all 25

Trending Articles