public function findUserIdByEmail($email) {
        $userId = DB::table('users')
            ->where('email', $email)
            ->value('id')
        ;

        if (!$userId) {
            return 0;
        }

        return $userId;
    }
public function findUserIdByEmail($email) {
        $userId = DB::table('users')
            ->where('email', $email)
            ->value('id')
        ;

        if (!$userId) {
            return 0;
        }

        return $userId;
    }
public function findUserIdByEmail ( $ email ) { $ userId = DB :: table ( 'users' ) -> where ( 'email' , $ email ) -> value ( 'id' ) ; if ( ! $ userId ) { return 0 ; } return $ userId ; }
Find the user's ID from their email address.

Return 0 if no ID is found.

@param  string  $email
@return int
Find the user s ID from their email address .