Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel auth sha-1

There is actually a easier (or more simple, at least) solution for a case like this. you can 'fake' the hashing, by using this method in the user model:

public function getAuthPassword() {
    return Hash::make($this->password);
}
And hashing the input with your own hash function. For instance, if your passwords are currently hashed with sha1, you can validate the user with

Auth::attempt(array('email' => $email, 'password' => sha1($password))
It doesn't feel like good coding practice, to do it this way, but it will certainly be easier than rewriting the hash module.
Comment

PREVIOUS NEXT
Code Example
Php :: laravel longblob migration 
Php :: wp wc archive product page template 
Php :: Skip model accessor laravel8 
Php :: php howto ignore file with BOM 
Php :: laravel_login1 
Php :: Get PHP String Length 
Php :: scirvere su file php 
Php :: laravel get url parameter value in controller 
Php :: Laravel 8 Auth Scaffolding using Inertia Jetstream 
Php :: where statement multiple argument in codeigniter 
Php :: laravel pest assertstatus 
Php :: php pass 2 date value to javascript 
Php :: check mobile number length in php 
Php :: Laravel save without an event 
Php :: custom validation in laravel 
Php :: log php 
Php :: status code 301 
Php :: wordpress query a post by id 
Php :: phpstorm using extract to create variales 
Php :: Create fake users on click laravel 
Php :: wordpress login programmatically 
Php :: php 7 The each() function is deprecated. 
Php :: csv file import to mysqli using php 
Php :: check count in laravel 
Php :: connect php mysql procedural way 
Php :: using custom fonts in php 
Php :: laravel remove controller 
Php :: delete a migration laravel 
Php :: date subtraction php 
Php :: mysql gone away error in php 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =