def post(self):
        """
        Update current user profile

        Arguments
        ---------
        password: string
            Current Password
        new_password: string
            New Password
        confirm_password: string
            New Password
        email: string
            Email address

        Returns
        -------
        result: JSON
            message, HTTP code
        """
        try:
            marsh_schema = parse_json_schema().load(request.json)
            args = marsh_schema
        except ValidationError as errors:
            logger.debug('Validation error: {}'.format(errors))
            return errors.messages, 500
        logger.debug('Updating user details')
        user = User.query.filter_by(id=current_user.id).first()
        ret = []
        if isinstance(user, User) and 'password' in args:
            if args['password']:
                if 'new_password' in args and 'confirm_password' in args:
                    if args['confirm_password'] and args['new_password']:
                        if args['new_password'] != args['confirm_password']:
                            return {'msg': 'Passwords do not match'}, 400
                        if bcrypt.check_password_hash(user.password, args['password']):
                            pass_hash = bcrypt.generate_password_hash(args['new_password'])
                            user.password = pass_hash.decode('utf-8')
                            logger.debug('Updating password')
                            ret.append({'msg': 'Password updated'})
                            crackq.app.session_interface.regenerate(session)
                        else:
                            return {'msg': 'Invalid Password'}, 401
                if 'email' in args:
                    if args['email'] and email_check(args['email']):
                        if bcrypt.check_password_hash(user.password, args['password']):
                            user.email = args['email']
                            logger.debug('Updating email')
                            ret.append({'msg': 'Email updated'})
                        else:
                            return {'msg': 'Invalid Password'}, 401
                    #else:
                    #    return {'msg': 'Invalid Email'}, 500
            if ret:
                db.session.commit()
                return jsonify(ret), 200
        return {'msg': 'Invalid Request'}, 500

        Update current user profile

        Arguments
        ---------
        password: string
            Current Password
        new_password: string
            New Password
        confirm_password: string
            New Password
        email: string
            Email address

        Returns
        -------
        result: JSON
            message, HTTP code
        
crackq/cq_api.py