Merge branch 'hotfix/user'
This commit is contained in:
@@ -126,9 +126,14 @@ class Util
|
|||||||
|
|
||||||
public static function mask($str)
|
public static function mask($str)
|
||||||
{
|
{
|
||||||
|
$length = strlen($str);
|
||||||
|
|
||||||
if(empty($str)){
|
if(empty($str)){
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
if($length <= 6){
|
||||||
|
return $str;
|
||||||
|
}
|
||||||
return substr($str, 0, 3) . '****' . substr($str, -4);
|
return substr($str, 0, 3) . '****' . substr($str, -4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user