public static function randomPassword($length = 8, $string = null) {
        if (!$string)
            $string = 'bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ123456789&^%$#@!_-+=';
        $chars = str_split(str_shuffle($string));
        $password = '';
        foreach (array_rand($chars, $length) as $key) {
            $password .= $chars[$key];
        }
        return $password;
    }