add passw3ord
This commit is contained in:
@@ -131,5 +131,12 @@ abstract class BaseController extends Controller
|
||||
return json_decode($result, true);
|
||||
}
|
||||
|
||||
public function randomPassword( $length = 8 )
|
||||
{
|
||||
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?";
|
||||
$length = rand(10, 16);
|
||||
$password = substr( str_shuffle(sha1(rand() . time()) . $chars ), 0, $length );
|
||||
return $password;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user